@agoric/inter-protocol 0.16.1 → 0.16.2-calypso-dev-84eb287.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 (192) hide show
  1. package/README.md +6 -6
  2. package/package.json +41 -36
  3. package/scripts/build-bundles.js +5 -21
  4. package/src/auction/auctionBook.d.ts +147 -0
  5. package/src/auction/auctionBook.d.ts.map +1 -0
  6. package/src/auction/auctionBook.js +135 -103
  7. package/src/auction/auctioneer.d.ts +69 -0
  8. package/src/auction/auctioneer.d.ts.map +1 -0
  9. package/src/auction/auctioneer.js +63 -49
  10. package/src/auction/offerBook.d.ts +45 -0
  11. package/src/auction/offerBook.d.ts.map +1 -0
  12. package/src/auction/offerBook.js +13 -12
  13. package/src/auction/params.d.ts +144 -0
  14. package/src/auction/params.d.ts.map +1 -0
  15. package/src/auction/params.js +10 -9
  16. package/src/auction/scheduleMath.d.ts +5 -0
  17. package/src/auction/scheduleMath.d.ts.map +1 -0
  18. package/src/auction/scheduleMath.js +17 -15
  19. package/src/auction/scheduler.d.ts +49 -0
  20. package/src/auction/scheduler.d.ts.map +1 -0
  21. package/src/auction/scheduler.js +51 -43
  22. package/src/auction/sortedOffers.d.ts +8 -0
  23. package/src/auction/sortedOffers.d.ts.map +1 -0
  24. package/src/auction/sortedOffers.js +9 -7
  25. package/src/auction/util.d.ts +32 -0
  26. package/src/auction/util.d.ts.map +1 -0
  27. package/src/auction/util.js +6 -4
  28. package/src/clientSupport.d.ts +167 -0
  29. package/src/clientSupport.d.ts.map +1 -0
  30. package/src/clientSupport.js +154 -96
  31. package/src/collectFees.d.ts +2 -0
  32. package/src/collectFees.d.ts.map +1 -0
  33. package/src/contractSupport.d.ts +28 -0
  34. package/src/contractSupport.d.ts.map +1 -0
  35. package/src/contractSupport.js +14 -12
  36. package/src/econCommitteeCharter.d.ts +39 -0
  37. package/src/econCommitteeCharter.d.ts.map +1 -0
  38. package/src/econCommitteeCharter.js +21 -20
  39. package/src/feeDistributor.d.ts +224 -0
  40. package/src/feeDistributor.d.ts.map +1 -0
  41. package/src/feeDistributor.js +37 -33
  42. package/src/index.d.ts +2 -0
  43. package/src/index.d.ts.map +1 -0
  44. package/src/index.js +1 -0
  45. package/src/interest-math.d.ts +3 -0
  46. package/src/interest-math.d.ts.map +1 -0
  47. package/src/interest.d.ts +28 -0
  48. package/src/interest.d.ts.map +1 -0
  49. package/src/interest.js +21 -16
  50. package/src/price/README.md +13 -0
  51. package/src/price/fluxAggregatorContract.d.ts +70 -0
  52. package/src/price/fluxAggregatorContract.d.ts.map +1 -0
  53. package/src/price/fluxAggregatorContract.js +62 -55
  54. package/src/price/fluxAggregatorKit.d.ts +103 -0
  55. package/src/price/fluxAggregatorKit.d.ts.map +1 -0
  56. package/src/price/fluxAggregatorKit.js +50 -37
  57. package/src/price/priceOracleKit.d.ts +38 -0
  58. package/src/price/priceOracleKit.d.ts.map +1 -0
  59. package/src/price/priceOracleKit.js +11 -13
  60. package/src/price/roundsManager.d.ts +204 -0
  61. package/src/price/roundsManager.d.ts.map +1 -0
  62. package/src/price/roundsManager.js +79 -82
  63. package/src/proposals/README.md +2 -3
  64. package/src/proposals/add-auction.d.ts +69 -0
  65. package/src/proposals/add-auction.d.ts.map +1 -0
  66. package/src/proposals/add-auction.js +180 -0
  67. package/src/proposals/addAssetToVault.d.ts +160 -0
  68. package/src/proposals/addAssetToVault.d.ts.map +1 -0
  69. package/src/proposals/addAssetToVault.js +172 -38
  70. package/src/proposals/committee-proposal.d.ts +113 -0
  71. package/src/proposals/committee-proposal.d.ts.map +1 -0
  72. package/src/proposals/committee-proposal.js +25 -31
  73. package/src/proposals/core-proposal.d.ts +149 -0
  74. package/src/proposals/core-proposal.d.ts.map +1 -0
  75. package/src/proposals/core-proposal.js +9 -11
  76. package/src/proposals/econ-behaviors.d.ts +539 -0
  77. package/src/proposals/econ-behaviors.d.ts.map +1 -0
  78. package/src/proposals/econ-behaviors.js +64 -45
  79. package/src/proposals/price-feed-proposal.d.ts +84 -0
  80. package/src/proposals/price-feed-proposal.d.ts.map +1 -0
  81. package/src/proposals/price-feed-proposal.js +108 -51
  82. package/src/proposals/startEconCommittee.d.ts +34 -0
  83. package/src/proposals/startEconCommittee.d.ts.map +1 -0
  84. package/src/proposals/startEconCommittee.js +2 -2
  85. package/src/proposals/startPSM.d.ts +59 -0
  86. package/src/proposals/startPSM.d.ts.map +1 -0
  87. package/src/proposals/startPSM.js +38 -27
  88. package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +24 -0
  89. package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +1 -0
  90. package/src/proposals/upgrade-scaledPriceAuthorities.js +78 -0
  91. package/src/proposals/upgrade-vaults.d.ts +35 -0
  92. package/src/proposals/upgrade-vaults.d.ts.map +1 -0
  93. package/src/proposals/upgrade-vaults.js +235 -0
  94. package/src/proposals/utils.d.ts +17 -0
  95. package/src/proposals/utils.d.ts.map +1 -0
  96. package/src/proposals/utils.js +34 -7
  97. package/src/provisionPool.d.ts +167 -0
  98. package/src/provisionPool.d.ts.map +1 -0
  99. package/src/provisionPool.js +122 -0
  100. package/src/provisionPoolKit.d.ts +367 -0
  101. package/src/provisionPoolKit.d.ts.map +1 -0
  102. package/src/provisionPoolKit.js +522 -0
  103. package/src/psm/psm.d.ts +122 -0
  104. package/src/psm/psm.d.ts.map +1 -0
  105. package/src/psm/psm.js +73 -69
  106. package/src/psm/types-ambient.d.ts +2 -0
  107. package/src/psm/types-ambient.d.ts.map +1 -0
  108. package/src/psm/types-ambient.js +3 -0
  109. package/src/reserve/assetReserve.d.ts +47 -0
  110. package/src/reserve/assetReserve.d.ts.map +1 -0
  111. package/src/reserve/assetReserve.js +28 -19
  112. package/src/reserve/assetReserveKit.d.ts +74 -0
  113. package/src/reserve/assetReserveKit.d.ts.map +1 -0
  114. package/src/reserve/assetReserveKit.js +18 -24
  115. package/src/reserve/params.d.ts +10 -0
  116. package/src/reserve/params.d.ts.map +1 -0
  117. package/src/tokens.d.ts +3 -0
  118. package/src/tokens.d.ts.map +1 -0
  119. package/src/tokens.js +5 -0
  120. package/src/vaultFactory/burn.d.ts +2 -0
  121. package/src/vaultFactory/burn.d.ts.map +1 -0
  122. package/src/vaultFactory/burn.js +1 -1
  123. package/src/vaultFactory/liquidation.d.ts +23 -0
  124. package/src/vaultFactory/liquidation.d.ts.map +1 -0
  125. package/src/vaultFactory/liquidation.js +36 -22
  126. package/src/vaultFactory/math.d.ts +11 -0
  127. package/src/vaultFactory/math.d.ts.map +1 -0
  128. package/src/vaultFactory/math.js +10 -9
  129. package/src/vaultFactory/orderedVaultStore.d.ts +93 -0
  130. package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
  131. package/src/vaultFactory/orderedVaultStore.js +8 -11
  132. package/src/vaultFactory/params.d.ts +140 -0
  133. package/src/vaultFactory/params.d.ts.map +1 -0
  134. package/src/vaultFactory/params.js +52 -24
  135. package/src/vaultFactory/prioritizedVaults.d.ts +279 -0
  136. package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
  137. package/src/vaultFactory/prioritizedVaults.js +4 -4
  138. package/src/vaultFactory/proceeds.d.ts +35 -0
  139. package/src/vaultFactory/proceeds.d.ts.map +1 -0
  140. package/src/vaultFactory/proceeds.js +26 -18
  141. package/src/vaultFactory/storeUtils.d.ts +25 -0
  142. package/src/vaultFactory/storeUtils.d.ts.map +1 -0
  143. package/src/vaultFactory/storeUtils.js +10 -12
  144. package/src/vaultFactory/types-ambient.d.ts +137 -0
  145. package/src/vaultFactory/types-ambient.d.ts.map +1 -0
  146. package/src/vaultFactory/{types.js → types-ambient.js} +42 -42
  147. package/src/vaultFactory/vault.d.ts +332 -0
  148. package/src/vaultFactory/vault.d.ts.map +1 -0
  149. package/src/vaultFactory/vault.js +99 -93
  150. package/src/vaultFactory/vaultDirector.d.ts +340 -0
  151. package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
  152. package/src/vaultFactory/vaultDirector.js +63 -50
  153. package/src/vaultFactory/vaultFactory.d.ts +201 -0
  154. package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
  155. package/src/vaultFactory/vaultFactory.js +49 -32
  156. package/src/vaultFactory/vaultHolder.d.ts +126 -0
  157. package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
  158. package/src/vaultFactory/vaultHolder.js +10 -14
  159. package/src/vaultFactory/vaultKit.d.ts +32 -0
  160. package/src/vaultFactory/vaultKit.d.ts.map +1 -0
  161. package/src/vaultFactory/vaultKit.js +5 -4
  162. package/src/vaultFactory/vaultManager.d.ts +674 -0
  163. package/src/vaultFactory/vaultManager.d.ts.map +1 -0
  164. package/src/vaultFactory/vaultManager.js +249 -151
  165. package/CHANGELOG.md +0 -1033
  166. package/bundles/bundle-auctioneer-js-meta.json +0 -722
  167. package/bundles/bundle-auctioneer.js +0 -1
  168. package/bundles/bundle-econCommitteeCharter-js-meta.json +0 -514
  169. package/bundles/bundle-econCommitteeCharter.js +0 -1
  170. package/bundles/bundle-feeDistributor-js-meta.json +0 -458
  171. package/bundles/bundle-feeDistributor.js +0 -1
  172. package/bundles/bundle-fluxAggregatorKit-js-meta.json +0 -674
  173. package/bundles/bundle-fluxAggregatorKit.js +0 -1
  174. package/bundles/bundle-psm-js-meta.json +0 -666
  175. package/bundles/bundle-psm.js +0 -1
  176. package/bundles/bundle-reserve-js-meta.json +0 -662
  177. package/bundles/bundle-reserve.js +0 -1
  178. package/bundles/bundle-scaledPriceAuthority-js-meta.json +0 -542
  179. package/bundles/bundle-scaledPriceAuthority.js +0 -1
  180. package/bundles/bundle-vaultFactory-js-meta.json +0 -790
  181. package/bundles/bundle-vaultFactory.js +0 -1
  182. package/exported.js +0 -2
  183. package/scripts/add-collateral-core.js +0 -112
  184. package/scripts/deploy-contracts.js +0 -100
  185. package/scripts/init-core.js +0 -198
  186. package/scripts/invite-committee-core.js +0 -42
  187. package/scripts/manual-price-feed.js +0 -117
  188. package/scripts/price-feed-core.js +0 -104
  189. package/scripts/start-local-chain.sh +0 -84
  190. package/src/psm/types.js +0 -3
  191. package/src/typeGuards.js +0 -13
  192. package/src/vaultFactory/type-imports.js +0 -4
@@ -0,0 +1,45 @@
1
+ export function prepareScaledBidBook(baggage: Baggage): (bidScalingPattern: globalThis.Pattern, collateralBrand: globalThis.Brand) => import("@endo/exo").Guarded<{
2
+ /**
3
+ * @param {ZCFSeat} seat
4
+ * @param {Ratio} bidScaling
5
+ * @param {Amount<'nat'>} wanted
6
+ * @param {boolean} exitAfterBuy
7
+ */
8
+ add(seat: ZCFSeat, bidScaling: Ratio, wanted: Amount<"nat">, exitAfterBuy: boolean): string;
9
+ /** @param {Ratio} bidScaling */
10
+ offersAbove(bidScaling: Ratio): [string, BidderRecord][];
11
+ hasOrders(): boolean;
12
+ delete(key: any): void;
13
+ updateReceived(key: any, sold: any): void;
14
+ exitAllSeats(): void;
15
+ }>;
16
+ export function preparePriceBook(baggage: Baggage): (priceRatioPattern: globalThis.Pattern, collateralBrand: globalThis.Brand) => import("@endo/exo").Guarded<{
17
+ /**
18
+ * @param {ZCFSeat} seat
19
+ * @param {Ratio} price
20
+ * @param {Amount<'nat'>} wanted
21
+ * @param {boolean} exitAfterBuy
22
+ */
23
+ add(seat: ZCFSeat, price: Ratio, wanted: Amount<"nat">, exitAfterBuy: boolean): string;
24
+ offersAbove(price: any): [string, BidderRecord][];
25
+ hasOrders(): boolean;
26
+ delete(key: any): void;
27
+ updateReceived(key: any, sold: any): void;
28
+ exitAllSeats(): void;
29
+ }>;
30
+ export type BidderRecord = {
31
+ seat: ZCFSeat;
32
+ wanted: Amount<"nat">;
33
+ seqNum: NatValue;
34
+ received: Amount<"nat">;
35
+ } & {
36
+ exitAfterBuy: boolean;
37
+ } & ({
38
+ bidScaling: Pattern;
39
+ price: undefined;
40
+ } | {
41
+ bidScaling: undefined;
42
+ price: Ratio;
43
+ });
44
+ import type { Baggage } from '@agoric/vat-data';
45
+ //# sourceMappingURL=offerBook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offerBook.d.ts","sourceRoot":"","sources":["offerBook.js"],"names":[],"mappings":"AAkDO,8CAFI,OAAO,wFA2Ke,WAC5B;IA1JC;;;;;OAKG;cAJQ,OAAO,cACP,KAAK,UACL,MAAM,CAAC,KAAK,CAAC,gBACb,OAAO;IAsBlB,gCAAgC;4BAApB,KAAK;;;;;GAqCpB;AAcI,0CAFI,OAAO,wFA8Ee,WAC5B;IA7DC;;;;;OAKG;cAJQ,OAAO,SACP,KAAK,UACL,MAAM,CAAC,KAAK,CAAC,gBACb,OAAO;;;;;;GA0DrB;2BAnMU;IACZ,IAAQ,EAAE,OAAO,CAAC;IAClB,MAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAU,EAAE,QAAQ,CAAC;IACrB,QAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CACzB,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,GAAG,CAC1B;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACzC;IAAE,UAAU,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAC1C;6BApBqB,kBAAkB"}
@@ -12,7 +12,7 @@ import {
12
12
  toScaledRateOfferKey,
13
13
  } from './sortedOffers.js';
14
14
 
15
- /** @typedef {import('@agoric/vat-data').Baggage} Baggage */
15
+ /** @import {Baggage} from '@agoric/vat-data' */
16
16
 
17
17
  // multiple offers might be provided at the same time (since the time
18
18
  // granularity is limited to blocks), so we increment a sequenceNumber with each
@@ -25,12 +25,14 @@ const nextSequenceNumber = () => {
25
25
 
26
26
  /**
27
27
  * @typedef {{
28
- * seat: ZCFSeat,
29
- * wanted: Amount<'nat'>,
30
- * seqNum: NatValue,
31
- * received: Amount<'nat'>,
32
- * } & {exitAfterBuy: boolean} & ({ bidScaling: Pattern, price: undefined } | { bidScaling: undefined, price: Ratio})
33
- * } BidderRecord
28
+ * seat: ZCFSeat;
29
+ * wanted: Amount<'nat'>;
30
+ * seqNum: NatValue;
31
+ * received: Amount<'nat'>;
32
+ * } & { exitAfterBuy: boolean } & (
33
+ * | { bidScaling: Pattern; price: undefined }
34
+ * | { bidScaling: undefined; price: Ratio }
35
+ * )} BidderRecord
34
36
  */
35
37
 
36
38
  const ScaledBidBookStateShape = harden({
@@ -41,7 +43,8 @@ const ScaledBidBookStateShape = harden({
41
43
 
42
44
  /**
43
45
  * Prices in this book are expressed as percentage of the full oracle price
44
- * snapshot taken when the auction started. .4 is 60% off. 1.1 is 10% above par.
46
+ * snapshot taken when the auction started. .4 is 60% off. 1.1 is 10% above
47
+ * par.
45
48
  *
46
49
  * @param {Baggage} baggage
47
50
  */
@@ -51,7 +54,6 @@ export const prepareScaledBidBook = baggage =>
51
54
  'scaledBidBook',
52
55
  undefined,
53
56
  /**
54
- *
55
57
  * @param {Pattern} bidScalingPattern
56
58
  * @param {Brand} collateralBrand
57
59
  */
@@ -134,8 +136,8 @@ const PriceBookStateShape = harden({
134
136
  });
135
137
 
136
138
  /**
137
- * Prices in this book are actual prices expressed in terms of bid amount
138
- * and collateral amount.
139
+ * Prices in this book are actual prices expressed in terms of bid amount and
140
+ * collateral amount.
139
141
  *
140
142
  * @param {Baggage} baggage
141
143
  */
@@ -145,7 +147,6 @@ export const preparePriceBook = baggage =>
145
147
  'priceBook',
146
148
  undefined,
147
149
  /**
148
- *
149
150
  * @param {Pattern} priceRatioPattern
150
151
  * @param {Brand} collateralBrand
151
152
  */
@@ -0,0 +1,144 @@
1
+ /**
2
+ * @import {AsyncSpecTuple} from '@agoric/governance/src/contractGovernance/typedParamManager.js';
3
+ * @import {SyncSpecTuple} from '@agoric/governance/src/contractGovernance/typedParamManager.js';
4
+ * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
5
+ */
6
+ export const InvitationShape: import("@endo/patterns").Matcher;
7
+ /**
8
+ * In seconds, how often to start an auction. The auction will start at
9
+ * AUCTION_START_DELAY seconds after a multiple of START_FREQUENCY, with the
10
+ * price at STARTING_RATE_BP. Every CLOCK_STEP, the price will be reduced by
11
+ * DISCOUNT_STEP_BP, as long as the rate is at or above LOWEST_RATE_BP, or until
12
+ * START_FREQUENCY has elapsed.
13
+ */
14
+ export const START_FREQUENCY: "StartFrequency";
15
+ /** in seconds, how often to reduce the price */
16
+ export const CLOCK_STEP: "ClockStep";
17
+ /** discount or markup for starting price in basis points. 9999 = 1bp discount */
18
+ export const STARTING_RATE_BP: "StartingRate";
19
+ /** A limit below which the price will not be discounted. */
20
+ export const LOWEST_RATE_BP: "LowestRate";
21
+ /** amount to reduce prices each time step in bp, as % of the start price */
22
+ export const DISCOUNT_STEP_BP: "DiscountStep";
23
+ /**
24
+ * VaultManagers liquidate vaults at a frequency configured by START_FREQUENCY.
25
+ * Auctions start this long after the hour to give vaults time to finish.
26
+ */
27
+ export const AUCTION_START_DELAY: "AuctionStartDelay";
28
+ export const PRICE_LOCK_PERIOD: "PriceLockPeriod";
29
+ export const auctioneerParamPattern: import("@endo/patterns").Matcher;
30
+ export namespace auctioneerParamTypes {
31
+ let Electorate: "invitation";
32
+ let StartFrequency: "relativeTime";
33
+ let ClockStep: "relativeTime";
34
+ let StartingRate: "nat";
35
+ let LowestRate: "nat";
36
+ let DiscountStep: "nat";
37
+ let AuctionStartDelay: "relativeTime";
38
+ let PriceLockPeriod: "relativeTime";
39
+ }
40
+ export function makeAuctioneerParams({ ElectorateInvitationAmount, StartFrequency, ClockStep, LowestRate, StartingRate, DiscountStep, AuctionStartDelay, PriceLockPeriod, TimerBrand, }: AuctionParams): {
41
+ Electorate: {
42
+ type: "invitation";
43
+ value: import("@agoric/ertp/src/types").SetAmount<import("@endo/patterns").Key>;
44
+ };
45
+ StartFrequency: {
46
+ type: "relativeTime";
47
+ value: import("@agoric/time").RelativeTimeRecord;
48
+ };
49
+ ClockStep: {
50
+ type: "relativeTime";
51
+ value: import("@agoric/time").RelativeTimeRecord;
52
+ };
53
+ AuctionStartDelay: {
54
+ type: "relativeTime";
55
+ value: import("@agoric/time").RelativeTimeRecord;
56
+ };
57
+ PriceLockPeriod: {
58
+ type: "relativeTime";
59
+ value: import("@agoric/time").RelativeTimeRecord;
60
+ };
61
+ StartingRate: {
62
+ type: "nat";
63
+ value: bigint;
64
+ };
65
+ LowestRate: {
66
+ type: "nat";
67
+ value: bigint;
68
+ };
69
+ DiscountStep: {
70
+ type: "nat";
71
+ value: bigint;
72
+ };
73
+ };
74
+ export function makeAuctioneerParamManager(publisherKit: import("@agoric/notifier").StoredPublisherKit<GovernanceSubscriptionState>, zcf: ZCF, initial: AuctionParams): import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
75
+ Electorate: "invitation";
76
+ StartFrequency: "relativeTime";
77
+ ClockStep: "relativeTime";
78
+ StartingRate: "nat";
79
+ LowestRate: "nat";
80
+ DiscountStep: "nat";
81
+ AuctionStartDelay: "relativeTime";
82
+ PriceLockPeriod: "relativeTime";
83
+ }>;
84
+ export function makeGovernedTerms({ storageNode: _storageNode, marshaller: _marshaller }: {
85
+ storageNode: ERef<StorageNode>;
86
+ marshaller: ERef<Marshaller>;
87
+ }, timer: ERef<import("@agoric/time").TimerService>, priceAuthority: ERef<PriceAuthority>, reservePublicFacet: ERef<AssetReservePublicFacet>, params: AuctionParams): {
88
+ priceAuthority: globalThis.ERef<PriceAuthority>;
89
+ reservePublicFacet: globalThis.ERef<globalThis.GovernedPublicFacet<import("@endo/exo").Guarded<{
90
+ makeAddCollateralInvitation(): Promise<Invitation<string, never>>;
91
+ getPublicTopics(): {
92
+ metrics: import("@agoric/zoe/src/contractSupport").PublicTopic<import("../reserve/assetReserveKit").MetricsNotification>;
93
+ };
94
+ }>>>;
95
+ timerService: globalThis.ERef<import("@agoric/time").TimerService>;
96
+ governedParams: {
97
+ Electorate: {
98
+ type: "invitation";
99
+ value: import("@agoric/ertp/src/types").SetAmount<import("@endo/patterns").Key>;
100
+ };
101
+ StartFrequency: {
102
+ type: "relativeTime";
103
+ value: import("@agoric/time").RelativeTimeRecord;
104
+ };
105
+ ClockStep: {
106
+ type: "relativeTime";
107
+ value: import("@agoric/time").RelativeTimeRecord;
108
+ };
109
+ AuctionStartDelay: {
110
+ type: "relativeTime";
111
+ value: import("@agoric/time").RelativeTimeRecord;
112
+ };
113
+ PriceLockPeriod: {
114
+ type: "relativeTime";
115
+ value: import("@agoric/time").RelativeTimeRecord;
116
+ };
117
+ StartingRate: {
118
+ type: "nat";
119
+ value: bigint;
120
+ };
121
+ LowestRate: {
122
+ type: "nat";
123
+ value: bigint;
124
+ };
125
+ DiscountStep: {
126
+ type: "nat";
127
+ value: bigint;
128
+ };
129
+ };
130
+ };
131
+ export type AuctionParams = {
132
+ ElectorateInvitationAmount: Amount<"set">;
133
+ StartFrequency: RelativeTime;
134
+ ClockStep: RelativeTime;
135
+ StartingRate: bigint;
136
+ LowestRate: bigint;
137
+ DiscountStep: bigint;
138
+ AuctionStartDelay: RelativeTime;
139
+ PriceLockPeriod: RelativeTime;
140
+ TimerBrand: import("@agoric/time").TimerBrand;
141
+ };
142
+ export type AuctionParamManager = ReturnType<typeof makeAuctioneerParamManager>;
143
+ import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
144
+ //# sourceMappingURL=params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["params.js"],"names":[],"mappings":"AAQA;;;;GAIG;AAGH,+DAAyD;AAEzD;;;;;;GAMG;AACH,+CAAgD;AAChD,gDAAgD;AAChD,qCAAsC;AACtC,iFAAiF;AACjF,8CAA+C;AAC/C,4DAA4D;AAC5D,0CAA2C;AAC3C,4EAA4E;AAC5E,8CAA+C;AAC/C;;;GAGG;AACH,sDAAuD;AAIvD,kDAAmD;AAEnD,sEASG;;;;;;;;;;;AA2BI,yLADK,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCxB;AAQM,yDAJI,OAAO,kBAAkB,EAAE,kBAAkB,CAAC,2BAA2B,CAAC,OAC1E,GAAG,WACH,aAAa;;;;;;;;;GA0BvB;AAUM,0FANI;IAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;CAAE,SAChE,IAAI,CAAC,OAAO,cAAc,EAAE,YAAY,CAAC,kBACzC,IAAI,CAAC,cAAc,CAAC,sBACpB,IAAI,CAAC,uBAAuB,CAAC,UAC7B,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBvB;;gCAxGa,MAAM,CAAC,KAAK,CAAC;oBACb,YAAY;eACZ,YAAY;kBACZ,MAAM;gBACN,MAAM;kBACN,MAAM;uBACN,YAAY;qBACZ,YAAY;gBACZ,OAAO,cAAc,EAAE,UAAU;;kCAmGjC,UAAU,CAAC,OAAO,0BAA0B,CAAC;oCAnKkC,4BAA4B"}
@@ -6,14 +6,17 @@ import {
6
6
  import { TimeMath, RelativeTimeRecordShape } from '@agoric/time';
7
7
  import { M } from '@agoric/store';
8
8
 
9
- /** @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').AsyncSpecTuple} AsyncSpecTuple */
10
- /** @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').SyncSpecTuple} SyncSpecTuple */
9
+ /**
10
+ * @import {AsyncSpecTuple} from '@agoric/governance/src/contractGovernance/typedParamManager.js';
11
+ * @import {SyncSpecTuple} from '@agoric/governance/src/contractGovernance/typedParamManager.js';
12
+ * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
13
+ */
11
14
 
12
15
  // TODO duplicated with zoe/src/TypeGuards.js
13
16
  export const InvitationShape = M.remotable('Invitation');
14
17
 
15
18
  /**
16
- * In seconds, how often to start an auction. The auction will start at
19
+ * In seconds, how often to start an auction. The auction will start at
17
20
  * AUCTION_START_DELAY seconds after a multiple of START_FREQUENCY, with the
18
21
  * price at STARTING_RATE_BP. Every CLOCK_STEP, the price will be reduced by
19
22
  * DISCOUNT_STEP_BP, as long as the rate is at or above LOWEST_RATE_BP, or until
@@ -70,12 +73,10 @@ export const auctioneerParamTypes = harden({
70
73
  * @property {bigint} DiscountStep
71
74
  * @property {RelativeTime} AuctionStartDelay
72
75
  * @property {RelativeTime} PriceLockPeriod
73
- * @property {import('@agoric/time/src/types').TimerBrand} TimerBrand
76
+ * @property {import('@agoric/time').TimerBrand} TimerBrand
74
77
  */
75
78
 
76
- /**
77
- * @param {AuctionParams} initial
78
- */
79
+ /** @param {AuctionParams} initial */
79
80
  export const makeAuctioneerParams = ({
80
81
  ElectorateInvitationAmount,
81
82
  StartFrequency,
@@ -148,8 +149,8 @@ export const makeAuctioneerParamManager = (publisherKit, zcf, initial) => {
148
149
  harden(makeAuctioneerParamManager);
149
150
 
150
151
  /**
151
- * @param {{storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>}} caps
152
- * @param {ERef<Timer>} timer
152
+ * @param {{ storageNode: ERef<StorageNode>; marshaller: ERef<Marshaller> }} caps
153
+ * @param {ERef<import('@agoric/time').TimerService>} timer
153
154
  * @param {ERef<PriceAuthority>} priceAuthority
154
155
  * @param {ERef<AssetReservePublicFacet>} reservePublicFacet
155
156
  * @param {AuctionParams} params
@@ -0,0 +1,5 @@
1
+ export function computeRoundTiming(params: Awaited<import("./params.js").AuctionParamManager>, baseTime: TimestampRecord): import("./scheduler.js").Schedule;
2
+ export function nextDescendingStepTime(liveSchedule: import("./scheduler.js").Schedule | null, nextSchedule: import("./scheduler.js").Schedule | null, now: Timestamp): Timestamp | null;
3
+ export function timeVsSchedule(time: Timestamp, schedule: import("./scheduler.js").Schedule): "before" | "during" | "endExactly" | "after";
4
+ import type { TimestampRecord } from '@agoric/time';
5
+ //# sourceMappingURL=scheduleMath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduleMath.d.ts","sourceRoot":"","sources":["scheduleMath.js"],"names":[],"mappings":"AA0CO,2CAJI,OAAO,CAAC,OAAO,aAAa,EAAE,mBAAmB,CAAC,YAClD,eAAe,GACb,OAAO,gBAAgB,EAAE,QAAQ,CAqE7C;AAcM,qDALI,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,gBACxC,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,OACxC,SAAS,GACP,SAAS,GAAG,IAAI,CAuB5B;AAQM,qCAJI,SAAS,YACT,OAAO,gBAAgB,EAAE,QAAQ,GAC/B,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAiBxD;qCAjKkC,cAAc"}
@@ -4,6 +4,8 @@ import { TimeMath } from '@agoric/time';
4
4
  import { natSafeMath } from '@agoric/zoe/src/contractSupport/index.js';
5
5
  import { assertAllDefined, makeTracer } from '@agoric/internal';
6
6
 
7
+ /** @import {TimestampRecord} from '@agoric/time'; */
8
+
7
9
  const { subtract, multiply, floorDivide } = natSafeMath;
8
10
  const { Fail } = assert;
9
11
 
@@ -18,23 +20,24 @@ const subtract1 = relTime =>
18
20
  /**
19
21
  * The length of the auction has to be inferred from the governed params.
20
22
  *
21
- * 1. The auction starts by offering collateral at a `StartingRate` (e.g., 105%)
22
- * of the market price at auction start, and continues until it reaches
23
- * (or would exceed on its next step) LowestRate (e.g., 65%)
23
+ * 1. The auction starts by offering collateral at a `StartingRate` (e.g., 105%) of
24
+ * the market price at auction start, and continues until it reaches (or
25
+ * would exceed on its next step) LowestRate (e.g., 65%)
24
26
  * 2. The offer price changes every `ClockStep` seconds
25
- * 3. The offer price changes by `DiscountStep` amount (e.g., 5%) each step So
26
- * it must run however many `ClockSteps` are required to get from
27
- * `StartingRate` to `LowestRate` changing by `DiscountStep` each time.
27
+ * 3. The offer price changes by `DiscountStep` amount (e.g., 5%) each step So it
28
+ * must run however many `ClockSteps` are required to get from `StartingRate`
29
+ * to `LowestRate` changing by `DiscountStep` each time.
28
30
  *
29
- * Therefore, the duration is `(StartingRate - LowestRate) / DiscountStep * ClockStep`.
31
+ * Therefore, the duration is `(StartingRate - LowestRate) / DiscountStep *
32
+ * ClockStep`.
30
33
  *
31
- * Note that this is what's *scheduled*. More than one auction can be running
34
+ * Note that this is what's _scheduled_. More than one auction can be running
32
35
  * simultaneously, and some conditions can cause some of the auctions to stop
33
36
  * selling early (e.g. reaching their target debt to raise or selling all of
34
37
  * their collateral).
35
38
  *
36
39
  * @param {Awaited<import('./params.js').AuctionParamManager>} params
37
- * @param {Timestamp} baseTime
40
+ * @param {TimestampRecord} baseTime
38
41
  * @returns {import('./scheduler.js').Schedule}
39
42
  */
40
43
  export const computeRoundTiming = (params, baseTime) => {
@@ -82,7 +85,7 @@ export const computeRoundTiming = (params, baseTime) => {
82
85
  // computed start is `startDelay + baseTime + freq - (baseTime mod freq)`.
83
86
  // That is, if there are hourly starts, we add an hour to the time, and
84
87
  // subtract baseTime mod freq. Then we add the delay.
85
- /** @type {import('@agoric/time/src/types').TimestampRecord} */
88
+ /** @type {TimestampRecord} */
86
89
  const startTime = TimeMath.addAbsRel(
87
90
  TimeMath.addAbsRel(
88
91
  baseTime,
@@ -108,10 +111,10 @@ export const computeRoundTiming = (params, baseTime) => {
108
111
  harden(computeRoundTiming);
109
112
 
110
113
  /**
111
- * Calculate when the next descending step will start. If we're between
112
- * auctions (i.e. liveSchedule is undefined), or the last step of the current
113
- * auction has started, then it'll be nextSchedule.startTime. Otherwise, it's
114
- * the start of the step following the current step.
114
+ * Calculate when the next descending step will start. If we're between auctions
115
+ * (i.e. liveSchedule is undefined), or the last step of the current auction has
116
+ * started, then it'll be nextSchedule.startTime. Otherwise, it's the start of
117
+ * the step following the current step.
115
118
  *
116
119
  * @param {import('./scheduler.js').Schedule | null} liveSchedule
117
120
  * @param {import('./scheduler.js').Schedule | null} nextSchedule
@@ -143,7 +146,6 @@ export const nextDescendingStepTime = (liveSchedule, nextSchedule, now) => {
143
146
  harden(nextDescendingStepTime);
144
147
 
145
148
  /**
146
- *
147
149
  * @param {Timestamp} time
148
150
  * @param {import('./scheduler.js').Schedule} schedule
149
151
  * @returns {'before' | 'during' | 'endExactly' | 'after'}
@@ -0,0 +1,49 @@
1
+ export function makeScheduler(auctionDriver: AuctionDriver, timer: import("@agoric/time").TimerService, params: Awaited<import("./params.js").AuctionParamManager>, timerBrand: import("@agoric/time").TimerBrand, scheduleRecorder: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<ScheduleNotification>, paramUpdateSubscription: StoredSubscription<GovernanceSubscriptionState>): Promise<{
2
+ getSchedule: () => {
3
+ liveAuctionSchedule: Schedule | null;
4
+ nextAuctionSchedule: Schedule | null;
5
+ };
6
+ getAuctionState: () => "active" | "waiting";
7
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
8
+ getSchedule: () => {
9
+ liveAuctionSchedule: Schedule | null;
10
+ nextAuctionSchedule: Schedule | null;
11
+ };
12
+ getAuctionState: () => "active" | "waiting";
13
+ }>>;
14
+ export type AuctionDriver = {
15
+ reducePriceAndTrade: () => void;
16
+ finalize: () => void;
17
+ startRound: () => void;
18
+ capturePrices: () => void;
19
+ };
20
+ export type ScheduleNotification = {
21
+ /**
22
+ * start time of current auction if
23
+ * auction is active
24
+ */
25
+ activeStartTime: Timestamp | null;
26
+ /**
27
+ * start time of next auction
28
+ */
29
+ nextStartTime: Timestamp | null;
30
+ /**
31
+ * when the next descending
32
+ * step will take place
33
+ */
34
+ nextDescendingStepTime: Timestamp | null;
35
+ };
36
+ export type Schedule = {
37
+ startTime: import("@agoric/time").TimestampRecord;
38
+ endTime: import("@agoric/time").TimestampRecord;
39
+ steps: NatValue;
40
+ endRate: NatValue;
41
+ startDelay: RelativeTime;
42
+ clockStep: RelativeTime;
43
+ lockTime?: Timestamp | undefined;
44
+ };
45
+ export type FullSchedule = {
46
+ nextAuctionSchedule: Schedule | null;
47
+ liveAuctionSchedule: Schedule | null;
48
+ };
49
+ //# sourceMappingURL=scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["scheduler.js"],"names":[],"mappings":"AA+EO,6CAPI,aAAa,SACb,OAAO,cAAc,EAAE,YAAY,UACnC,OAAO,CAAC,OAAO,aAAa,EAAE,mBAAmB,CAAC,cAClD,OAAO,cAAc,EAAE,UAAU,oBACjC,OAAO,6CAA6C,EAAE,QAAQ,CAAC,oBAAoB,CAAC,2BACpF,kBAAkB,CAAC,2BAA2B,CAAC;;;;;;;;;;;;IA2RzD;;yBA5Ta,MAAM,IAAI;cACV,MAAM,IAAI;gBACV,MAAM,IAAI;mBACV,MAAM,IAAI;;;;;;;qBAKV,SAAS,GAAG,IAAI;;;;mBAEhB,SAAS,GAAG,IAAI;;;;;4BAChB,SAAS,GAAG,IAAI;;;eAqThB,OAAO,cAAc,EAAE,eAAe;aACtC,OAAO,cAAc,EAAE,eAAe;WACtC,QAAQ;aACR,QAAQ;gBACR,YAAY;eACZ,YAAY;;;;yBAMZ,QAAQ,GAAG,IAAI;yBACf,QAAQ,GAAG,IAAI"}
@@ -20,21 +20,22 @@ const MAX_LATE_TICK = 300n;
20
20
 
21
21
  /**
22
22
  * @file The scheduler is presumed to be quiescent between auction rounds. Each
23
- * Auction round consists of a sequence of steps with decreasing prices. There
24
- * should always be a next schedule, but between rounds, liveSchedule is null.
23
+ * Auction round consists of a sequence of steps with decreasing prices. There
24
+ * should always be a next schedule, but between rounds, liveSchedule is
25
+ * null.
25
26
  *
26
- * The lock period that the liquidators use might start before the previous
27
- * round has finished, so we need to schedule the next round each time an
28
- * auction starts. This means if the scheduling parameters change, it'll be a
29
- * full cycle before we switch. Otherwise, the vaults wouldn't know when to
30
- * start their lock period. If the lock period for the next auction hasn't
31
- * started when each aucion ends, we recalculate it, in case the parameters have
32
- * changed.
27
+ * The lock period that the liquidators use might start before the previous
28
+ * round has finished, so we need to schedule the next round each time an
29
+ * auction starts. This means if the scheduling parameters change, it'll be a
30
+ * full cycle before we switch. Otherwise, the vaults wouldn't know when to
31
+ * start their lock period. If the lock period for the next auction hasn't
32
+ * started when each aucion ends, we recalculate it, in case the parameters
33
+ * have changed.
33
34
  *
34
- * If the clock skips forward (because of a chain halt, for instance), the
35
- * scheduler will try to cleanly and quickly finish any round already in
36
- * progress. It would take additional work on the manual timer to test this
37
- * thoroughly.
35
+ * If the clock skips forward (because of a chain halt, for instance), the
36
+ * scheduler will try to cleanly and quickly finish any round already in
37
+ * progress. It would take additional work on the manual timer to test this
38
+ * thoroughly.
38
39
  */
39
40
 
40
41
  const makeCancelToken = makeCancelTokenMaker('scheduler');
@@ -49,12 +50,11 @@ const makeCancelToken = makeCancelTokenMaker('scheduler');
49
50
 
50
51
  /**
51
52
  * @typedef {object} ScheduleNotification
52
- *
53
- * @property {Timestamp | null} activeStartTime start time of current
54
- * auction if auction is active
53
+ * @property {Timestamp | null} activeStartTime start time of current auction if
54
+ * auction is active
55
55
  * @property {Timestamp | null} nextStartTime start time of next auction
56
- * @property {Timestamp | null} nextDescendingStepTime when the next descending step
57
- * will take place
56
+ * @property {Timestamp | null} nextDescendingStepTime when the next descending
57
+ * step will take place
58
58
  */
59
59
 
60
60
  const safelyComputeRoundTiming = (params, baseTime) => {
@@ -71,9 +71,9 @@ const nominalStartTime = nextSchedule =>
71
71
 
72
72
  /**
73
73
  * @param {AuctionDriver} auctionDriver
74
- * @param {import('@agoric/time/src/types').TimerService} timer
74
+ * @param {import('@agoric/time').TimerService} timer
75
75
  * @param {Awaited<import('./params.js').AuctionParamManager>} params
76
- * @param {import('@agoric/time/src/types').TimerBrand} timerBrand
76
+ * @param {import('@agoric/time').TimerBrand} timerBrand
77
77
  * @param {import('@agoric/zoe/src/contractSupport/recorder.js').Recorder<ScheduleNotification>} scheduleRecorder
78
78
  * @param {StoredSubscription<GovernanceSubscriptionState>} paramUpdateSubscription
79
79
  */
@@ -92,7 +92,7 @@ export const makeScheduler = async (
92
92
  */
93
93
  let liveSchedule = null;
94
94
 
95
- /** @returns {Promise<{ now: Timestamp, nextSchedule: Schedule | null }>} */
95
+ /** @returns {Promise<{ now: Timestamp; nextSchedule: Schedule | null }>} */
96
96
  const initializeNextSchedule = async () => {
97
97
  return E.when(
98
98
  // XXX manualTimer returns a bigint, not a timeRecord.
@@ -114,7 +114,7 @@ export const makeScheduler = async (
114
114
 
115
115
  const stepCancelToken = makeCancelToken();
116
116
 
117
- /** @type {typeof AuctionState[keyof typeof AuctionState]} */
117
+ /** @type {(typeof AuctionState)[keyof typeof AuctionState]} */
118
118
  let auctionState = AuctionState.WAITING;
119
119
 
120
120
  /**
@@ -149,18 +149,7 @@ export const makeScheduler = async (
149
149
  auctionState = AuctionState.WAITING;
150
150
  auctionDriver.finalize();
151
151
 
152
- if (nextSchedule) {
153
- // only recalculate the next schedule at this point if the lock time has
154
- // not been reached.
155
- const nextLock = nextSchedule.lockTime;
156
- if (nextLock && TimeMath.compareAbs(now, nextLock) < 0) {
157
- const afterNow = TimeMath.addAbsRel(
158
- now,
159
- TimeMath.coerceRelativeTimeRecord(1n, timerBrand),
160
- );
161
- nextSchedule = safelyComputeRoundTiming(params, afterNow);
162
- }
163
- } else {
152
+ if (!nextSchedule) {
164
153
  console.error(
165
154
  '🛠️ finishAuctionRound without scheduling the next; repair with new auctioneer params',
166
155
  );
@@ -233,9 +222,13 @@ export const makeScheduler = async (
233
222
  liveSchedule.clockStep,
234
223
  Far('PriceStepWaker', {
235
224
  wake(time) {
236
- setTimeMonotonically(time);
237
- trace('wake step', now);
238
- void clockTick(liveSchedule);
225
+ try {
226
+ setTimeMonotonically(time);
227
+ trace('wake step', now);
228
+ clockTick(liveSchedule);
229
+ } catch (e) {
230
+ console.error(`⚠️ Auction threw ${e}. Caught in PriceStepWaker.`);
231
+ }
239
232
  },
240
233
  }),
241
234
  stepCancelToken,
@@ -249,10 +242,14 @@ export const makeScheduler = async (
249
242
  start,
250
243
  Far('SchedulerWaker', {
251
244
  wake(time) {
252
- setTimeMonotonically(time);
253
- auctionDriver.capturePrices();
254
- // eslint-disable-next-line no-use-before-define
255
- return startAuction();
245
+ try {
246
+ setTimeMonotonically(time);
247
+ auctionDriver.capturePrices();
248
+ // eslint-disable-next-line no-use-before-define
249
+ return startAuction();
250
+ } catch (e) {
251
+ console.error(`⚠️ Auction threw ${e}. Caught in SchedulerWaker.`);
252
+ }
256
253
  },
257
254
  }),
258
255
  );
@@ -333,7 +330,18 @@ export const makeScheduler = async (
333
330
  // NB: may be fired with the initial params as well
334
331
  async updateState(_newState) {
335
332
  trace('received param update', _newState);
333
+ await null;
334
+
335
+ let fixableSchedule;
336
336
  if (!nextSchedule) {
337
+ fixableSchedule = true;
338
+ } else {
339
+ now = await E(timer).getCurrentTimestamp();
340
+ fixableSchedule =
341
+ TimeMath.compareAbs(nextSchedule.startTime, now) < 0;
342
+ }
343
+
344
+ if (fixableSchedule) {
337
345
  trace('repairing nextSchedule and restarting');
338
346
  ({ nextSchedule } = await initializeNextSchedule());
339
347
  startSchedulingFromScratch();
@@ -354,8 +362,8 @@ export const makeScheduler = async (
354
362
 
355
363
  /**
356
364
  * @typedef {object} Schedule
357
- * @property {import('@agoric/time/src/types').TimestampRecord} startTime
358
- * @property {import('@agoric/time/src/types').TimestampRecord} endTime
365
+ * @property {import('@agoric/time').TimestampRecord} startTime
366
+ * @property {import('@agoric/time').TimestampRecord} endTime
359
367
  * @property {NatValue} steps
360
368
  * @property {NatValue} endRate
361
369
  * @property {RelativeTime} startDelay
@@ -0,0 +1,8 @@
1
+ export function toPartialOfferKey(offerPrice: Ratio): string;
2
+ export function toPriceOfferKey(offerPrice: Ratio, sequenceNumber: bigint): string;
3
+ export function fromPriceOfferKey(key: string, numBrand: Brand<"nat">, denomBrand: Brand<"nat">, useDecimals: number): [normalizedPrice: Ratio, sequenceNumber: bigint];
4
+ /** @type {(rate: Ratio) => string} */
5
+ export const toBidScalingComparator: (rate: Ratio) => string;
6
+ export function toScaledRateOfferKey(rate: Ratio, sequenceNumber: bigint): string;
7
+ export function fromScaledRateOfferKey(key: string, brand: Brand, useDecimals: number): [normalizedPrice: Ratio, sequenceNumber: bigint];
8
+ //# sourceMappingURL=sortedOffers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortedOffers.d.ts","sourceRoot":"","sources":["sortedOffers.js"],"names":[],"mappings":"AA8BO,8CAFI,KAAK,UAMf;AAUM,4CALI,KAAK,kBACL,MAAM,GACJ,MAAM,CAWlB;AAqCM,uCANI,MAAM,YACN,KAAK,CAAC,KAAK,CAAC,cACZ,KAAK,CAAC,KAAK,CAAC,eACZ,MAAM,GACJ,CAAC,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAS5D;AAED,sCAAsC;AACtC,qCADW,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAKhC;AAUK,2CALI,KAAK,kBACL,MAAM,GACJ,MAAM,CAWlB;AAUM,4CALI,MAAM,SACN,KAAK,eACL,MAAM,GACJ,CAAC,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAQ5D"}