@agoric/zoe 0.26.3-upgrade-14-dev-c8f9e7b.0 → 0.26.3-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.
- package/README.md +7 -7
- package/bundles/bundle-contractFacet-js-meta.json +622 -313
- package/bundles/bundle-contractFacet.d.ts +3 -3
- package/bundles/bundle-contractFacet.js +1 -1
- package/exported.js +1 -12
- package/package.json +75 -60
- package/src/cleanProposal.d.ts +2 -2
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +15 -12
- package/src/contractFacet/exit.d.ts.map +1 -1
- package/src/contractFacet/exit.js +1 -0
- package/src/contractFacet/internal-types.d.ts +2 -2
- package/src/contractFacet/internal-types.d.ts.map +1 -1
- package/src/contractFacet/internal-types.js +1 -1
- package/src/contractFacet/offerHandlerStorage.d.ts +4 -1
- package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -1
- package/src/contractFacet/offerHandlerStorage.js +11 -3
- package/src/contractFacet/reallocate.d.ts +3 -0
- package/src/contractFacet/reallocate.d.ts.map +1 -0
- package/src/contractFacet/reallocate.js +94 -0
- package/src/contractFacet/rightsConservation.d.ts.map +1 -1
- package/src/contractFacet/rightsConservation.js +3 -0
- package/src/contractFacet/types-ambient.d.ts +259 -0
- package/src/contractFacet/types-ambient.js +1 -0
- package/src/contractFacet/vatRoot.d.ts +4 -4
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.d.ts +5 -3
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +4 -4
- package/src/contractFacet/zcfSeat.d.ts +4 -2
- package/src/contractFacet/zcfSeat.d.ts.map +1 -1
- package/src/contractFacet/zcfSeat.js +125 -5
- package/src/contractFacet/zcfZygote.d.ts +1 -2
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +95 -42
- package/src/contractSupport/atomicTransfer.d.ts +0 -6
- package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
- package/src/contractSupport/atomicTransfer.js +5 -90
- package/src/contractSupport/bondingCurves.js +2 -2
- package/src/contractSupport/durability.d.ts +3 -3
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +5 -5
- package/src/contractSupport/index.d.ts +1 -0
- package/src/contractSupport/index.js +1 -0
- package/src/contractSupport/prepare-ownable.d.ts +11 -0
- package/src/contractSupport/prepare-ownable.d.ts.map +1 -0
- package/src/contractSupport/prepare-ownable.js +100 -0
- package/src/contractSupport/priceAuthority.d.ts +23 -15
- package/src/contractSupport/priceAuthority.d.ts.map +1 -1
- package/src/contractSupport/priceAuthority.js +32 -17
- package/src/contractSupport/priceAuthorityInitial.d.ts +3 -2
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +5 -2
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.js +23 -27
- package/src/contractSupport/priceAuthorityTransform.d.ts +14 -12
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.js +10 -8
- package/src/contractSupport/priceQuote.d.ts +7 -5
- package/src/contractSupport/priceQuote.d.ts.map +1 -1
- package/src/contractSupport/priceQuote.js +5 -1
- package/src/contractSupport/ratio.d.ts +2 -2
- package/src/contractSupport/ratio.d.ts.map +1 -1
- package/src/contractSupport/ratio.js +19 -15
- package/src/contractSupport/recorder.d.ts +31 -117
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/recorder.js +21 -10
- package/src/contractSupport/safeMath.d.ts +7 -7
- package/src/contractSupport/safeMath.d.ts.map +1 -1
- package/src/contractSupport/statistics.d.ts +1 -1
- package/src/contractSupport/statistics.d.ts.map +1 -1
- package/src/contractSupport/topics.d.ts +1 -1
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/{types.d.ts → types-ambient.d.ts} +4 -4
- package/src/contractSupport/types-ambient.d.ts.map +1 -0
- package/src/contractSupport/{types.js → types-ambient.js} +1 -1
- package/src/contractSupport/zoeHelpers.d.ts +1 -1
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.js +5 -11
- package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -1
- package/src/contracts/auction/firstPriceLogic.js +5 -8
- package/src/contracts/auction/index.d.ts +10 -10
- package/src/contracts/auction/index.d.ts.map +1 -1
- package/src/contracts/auction/index.js +2 -1
- package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -1
- package/src/contracts/auction/secondPriceLogic.js +1 -4
- package/src/contracts/automaticRefund.d.ts +1 -1
- package/src/contracts/automaticRefund.d.ts.map +1 -1
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +8 -9
- package/src/contracts/barterExchange.d.ts +1 -1
- package/src/contracts/barterExchange.d.ts.map +1 -1
- package/src/contracts/barterExchange.js +2 -3
- package/src/contracts/callSpread/calculateShares.d.ts +1 -8
- package/src/contracts/callSpread/calculateShares.d.ts.map +1 -1
- package/src/contracts/callSpread/calculateShares.js +1 -1
- package/src/contracts/callSpread/fundedCallSpread.d.ts +4 -0
- package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -1
- package/src/contracts/callSpread/fundedCallSpread.js +6 -4
- package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -1
- package/src/contracts/callSpread/payoffHandler.js +2 -1
- package/src/contracts/callSpread/percent.d.ts +2 -4
- package/src/contracts/callSpread/percent.d.ts.map +1 -1
- package/src/contracts/callSpread/position.d.ts +2 -2
- package/src/contracts/callSpread/pricedCallSpread.d.ts +6 -5
- package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
- package/src/contracts/callSpread/pricedCallSpread.js +8 -4
- package/src/contracts/callSpread/{types.d.ts → types-ambient.d.ts} +3 -3
- package/src/contracts/callSpread/types-ambient.d.ts.map +1 -0
- package/src/contracts/coveredCall-durable.d.ts +2 -4
- package/src/contracts/coveredCall-durable.d.ts.map +1 -1
- package/src/contracts/exported.js +3 -3
- package/src/contracts/loan/borrow.d.ts.map +1 -1
- package/src/contracts/loan/borrow.js +7 -4
- package/src/contracts/loan/close.d.ts.map +1 -1
- package/src/contracts/loan/close.js +3 -7
- package/src/contracts/loan/index.d.ts +5 -1
- package/src/contracts/loan/index.d.ts.map +1 -1
- package/src/contracts/loan/index.js +4 -0
- package/src/contracts/loan/liquidate.d.ts +1 -12
- package/src/contracts/loan/liquidate.d.ts.map +1 -1
- package/src/contracts/loan/liquidate.js +4 -2
- package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -1
- package/src/contracts/loan/scheduleLiquidation.js +1 -0
- package/src/contracts/loan/{types.d.ts → types-ambient.d.ts} +16 -17
- package/src/contracts/loan/types-ambient.d.ts.map +1 -0
- package/src/contracts/loan/{types.js → types-ambient.js} +11 -18
- package/src/contracts/loan/updateDebt.js +1 -1
- package/src/contracts/mintAndSellNFT.d.ts.map +1 -1
- package/src/contracts/mintPayments.d.ts +14 -6
- package/src/contracts/mintPayments.d.ts.map +1 -1
- package/src/contracts/mintPayments.js +1 -1
- package/src/contracts/oracle.d.ts +25 -3
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +7 -0
- package/src/contracts/otcDesk.d.ts +3 -3
- package/src/contracts/otcDesk.d.ts.map +1 -1
- package/src/contracts/otcDesk.js +1 -1
- package/src/contracts/priceAggregator.d.ts +112 -18
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +16 -18
- package/src/contracts/priceAggregatorTypes.d.ts +2 -2
- package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.d.ts +4 -5
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +6 -0
- package/src/contracts/sellItems.d.ts +2 -2
- package/src/contracts/sellItems.d.ts.map +1 -1
- package/src/contracts/sellItems.js +2 -3
- package/src/contracts/simpleExchange.d.ts +3 -3
- package/src/contracts/{types.d.ts → types-ambient.d.ts} +1 -1
- package/src/contracts/types-ambient.d.ts.map +1 -0
- package/src/handleWarning.d.ts.map +1 -1
- package/src/instanceRecordStorage.d.ts +1 -1
- package/src/instanceRecordStorage.d.ts.map +1 -1
- package/src/internal-types.d.ts +20 -32
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +18 -58
- package/src/issuerRecord.d.ts +2 -2
- package/src/issuerRecord.d.ts.map +1 -1
- package/src/issuerStorage.d.ts +4 -4
- package/src/issuerStorage.d.ts.map +1 -1
- package/src/issuerStorage.js +12 -28
- package/src/makeHandle.d.ts +2 -2
- package/src/makeHandle.d.ts.map +1 -1
- package/src/makeHandle.js +1 -1
- package/src/typeGuards.d.ts +119 -20
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +18 -9
- package/src/types-ambient.d.ts +41 -0
- package/src/types-ambient.d.ts.map +1 -0
- package/src/{types.js → types-ambient.js} +6 -14
- package/src/zoeService/escrowStorage.d.ts +1 -1
- package/src/zoeService/escrowStorage.d.ts.map +1 -1
- package/src/zoeService/escrowStorage.js +20 -27
- package/src/zoeService/feeMint.d.ts +9 -16
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/feeMint.js +21 -15
- package/src/zoeService/installationStorage.d.ts +5 -20
- package/src/zoeService/installationStorage.d.ts.map +1 -1
- package/src/zoeService/installationStorage.js +11 -7
- package/src/zoeService/instanceAdminStorage.d.ts +22 -42
- package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
- package/src/zoeService/instanceAdminStorage.js +1 -0
- package/src/zoeService/internal-types.d.ts +16 -16
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +6 -6
- package/src/zoeService/invitationQueries.d.ts.map +1 -1
- package/src/zoeService/invitationQueries.js +7 -5
- package/src/zoeService/makeInvitation.d.ts +3 -3
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +25 -21
- package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
- package/src/zoeService/offer/offer.d.ts.map +1 -1
- package/src/zoeService/offer/offer.js +2 -5
- package/src/zoeService/originalZoeSeat.d.ts +34 -0
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -0
- package/src/zoeService/originalZoeSeat.js +353 -0
- package/src/zoeService/startInstance.d.ts +3 -3
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +17 -11
- package/src/zoeService/{types.d.ts → types-ambient.d.ts} +26 -31
- package/src/zoeService/types-ambient.d.ts.map +1 -0
- package/src/zoeService/{types.js → types-ambient.js} +19 -32
- package/src/zoeService/utils.d.ts +54 -58
- package/src/zoeService/utils.test-d.d.ts +2 -0
- package/src/zoeService/utils.test-d.d.ts.map +1 -0
- package/src/zoeService/utils.test-d.ts +33 -0
- package/src/zoeService/zoe.d.ts +9 -13
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +7 -7
- package/src/zoeService/zoeSeat.d.ts +15 -45
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +214 -114
- package/src/zoeService/zoeStorageManager.d.ts +9 -43
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +8 -6
- package/tools/fakePriceAuthority.d.ts +9 -8
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +21 -17
- package/tools/fakeVatAdmin.d.ts +10 -10
- package/tools/manualPriceAuthority.d.ts +11 -6
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +15 -2
- package/tools/manualTimer.d.ts +21 -40
- package/tools/manualTimer.d.ts.map +1 -1
- package/tools/manualTimer.js +30 -16
- package/tools/prepare-test-env.js +1 -1
- package/tools/scriptedOracle.d.ts +3 -3
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +1 -1
- package/tools/scriptedPriceAuthority.d.ts +4 -0
- package/tools/scriptedPriceAuthority.d.ts.map +1 -1
- package/tools/scriptedPriceAuthority.js +6 -1
- package/tools/setup-zoe.d.ts +8 -9
- package/tools/setup-zoe.d.ts.map +1 -1
- package/tools/setup-zoe.js +16 -1
- package/tools/test-utils.d.ts +20 -0
- package/tools/test-utils.d.ts.map +1 -0
- package/tools/test-utils.js +26 -0
- package/tools/types.d.ts +21 -21
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +10 -10
- package/CHANGELOG.md +0 -1203
- package/src/contractFacet/types.d.ts +0 -191
- package/src/contractFacet/types.d.ts.map +0 -1
- package/src/contractFacet/types.js +0 -256
- package/src/contractSupport/types.d.ts.map +0 -1
- package/src/contracts/callSpread/types.d.ts.map +0 -1
- package/src/contracts/loan/types.d.ts.map +0 -1
- package/src/contracts/types.d.ts.map +0 -1
- package/src/objArrayConversion.d.ts +0 -5
- package/src/objArrayConversion.d.ts.map +0 -1
- package/src/objArrayConversion.js +0 -35
- package/src/types.d.ts +0 -45
- package/src/types.d.ts.map +0 -1
- package/src/zoeService/types.d.ts.map +0 -1
- package/tools/internal-types.d.ts +0 -12
- package/tools/internal-types.d.ts.map +0 -1
- package/tools/internal-types.js +0 -14
- package/tools/priceAuthorityRegistry.d.ts +0 -20
- package/tools/priceAuthorityRegistry.d.ts.map +0 -1
- package/tools/priceAuthorityRegistry.js +0 -209
- package/tools/types-ambient.d.ts +0 -142
- package/tools/types-ambient.d.ts.map +0 -1
- package/tools/types-ambient.js +0 -160
- /package/src/contracts/callSpread/{types.js → types-ambient.js} +0 -0
- /package/src/contracts/{types.js → types-ambient.js} +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
3
2
|
import { E } from '@endo/eventual-send';
|
|
4
3
|
import { Far } from '@endo/marshal';
|
|
5
|
-
import { assert, q, Fail } from '@agoric/assert';
|
|
6
4
|
import { makePromiseKit } from '@endo/promise-kit';
|
|
7
5
|
import { AmountMath, AmountShape, BrandShape } from '@agoric/ertp';
|
|
8
6
|
import { makeNotifier } from '@agoric/notifier';
|
|
@@ -10,6 +8,12 @@ import { makeTracer } from '@agoric/internal';
|
|
|
10
8
|
import { TimestampShape } from '@agoric/time';
|
|
11
9
|
import { M } from '@agoric/store';
|
|
12
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery, PriceQuoteCreate, PriceAuthorityKit, PriceQuoteTrigger, MutableQuote,} from '@agoric/zoe/tools/types.js';
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const { quote: q, Fail } = assert;
|
|
16
|
+
|
|
13
17
|
const trace = makeTracer('PA', false);
|
|
14
18
|
|
|
15
19
|
/**
|
|
@@ -61,15 +65,15 @@ export const PriceAuthorityI = M.interface('PriceAuthority', {
|
|
|
61
65
|
|
|
62
66
|
/**
|
|
63
67
|
* @param {object} opts
|
|
64
|
-
* @param {Issuer<'set'>} opts.quoteIssuer
|
|
68
|
+
* @param {Issuer<'set', PriceDescription>} opts.quoteIssuer
|
|
65
69
|
* @param {ERef<Notifier<unknown>>} opts.notifier
|
|
66
|
-
* @param {ERef<import('@agoric/time
|
|
70
|
+
* @param {ERef<import('@agoric/time').TimerService>} opts.timer
|
|
67
71
|
* @param {PriceQuoteCreate} opts.createQuote
|
|
68
72
|
* @param {Brand<'nat'>} opts.actualBrandIn
|
|
69
73
|
* @param {Brand<'nat'>} opts.actualBrandOut
|
|
70
74
|
* @returns {PriceAuthorityKit}
|
|
71
75
|
*/
|
|
72
|
-
export
|
|
76
|
+
export const makeOnewayPriceAuthorityKit = opts => {
|
|
73
77
|
const {
|
|
74
78
|
timer,
|
|
75
79
|
createQuote,
|
|
@@ -81,7 +85,7 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
81
85
|
|
|
82
86
|
let haveFirstQuote = false;
|
|
83
87
|
|
|
84
|
-
E(notifier)
|
|
88
|
+
void E(notifier)
|
|
85
89
|
.getUpdateSince()
|
|
86
90
|
.then(_ => (haveFirstQuote = true));
|
|
87
91
|
|
|
@@ -109,7 +113,8 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
109
113
|
*
|
|
110
114
|
* @param {CompareAmount} compareAmountsFn
|
|
111
115
|
*/
|
|
112
|
-
const makeQuoteWhenOut =
|
|
116
|
+
const makeQuoteWhenOut =
|
|
117
|
+
compareAmountsFn =>
|
|
113
118
|
/**
|
|
114
119
|
* Return a quote when triggerWhen is true of the arguments.
|
|
115
120
|
*
|
|
@@ -117,7 +122,7 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
117
122
|
* @param {Amount} amountOutLimit the value to compare with the output
|
|
118
123
|
* of calcAmountTrigger
|
|
119
124
|
*/
|
|
120
|
-
async
|
|
125
|
+
async (amountIn, amountOutLimit) => {
|
|
121
126
|
amountIn = AmountMath.coerce(actualBrandIn, amountIn);
|
|
122
127
|
amountOutLimit = AmountMath.coerce(actualBrandOut, amountOutLimit);
|
|
123
128
|
|
|
@@ -170,12 +175,13 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
170
175
|
*
|
|
171
176
|
* @param {CompareAmount} compareAmountsFn
|
|
172
177
|
*/
|
|
173
|
-
const makeMutableQuote =
|
|
178
|
+
const makeMutableQuote =
|
|
179
|
+
compareAmountsFn =>
|
|
174
180
|
/**
|
|
175
181
|
* @param {Amount<'nat'>} amountIn
|
|
176
182
|
* @param {Amount<'nat'>} amountOutLimit
|
|
177
183
|
*/
|
|
178
|
-
async
|
|
184
|
+
async (amountIn, amountOutLimit) => {
|
|
179
185
|
AmountMath.coerce(actualBrandIn, amountIn);
|
|
180
186
|
AmountMath.coerce(actualBrandOut, amountOutLimit);
|
|
181
187
|
|
|
@@ -273,12 +279,20 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
273
279
|
const record = await E(notifier).getUpdateSince(updateCount);
|
|
274
280
|
|
|
275
281
|
// We create a quote inline.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
282
|
+
let quote;
|
|
283
|
+
// createQuote can throw if priceAuthority is replaced.
|
|
284
|
+
|
|
285
|
+
try {
|
|
286
|
+
quote = createQuote(calcAmountOut => ({
|
|
287
|
+
amountIn,
|
|
288
|
+
amountOut: calcAmountOut(amountIn),
|
|
289
|
+
}));
|
|
290
|
+
} catch (e) {
|
|
291
|
+
// fall through
|
|
292
|
+
}
|
|
293
|
+
|
|
280
294
|
if (!quote) {
|
|
281
|
-
throw Fail`createQuote returned
|
|
295
|
+
throw Fail`createQuote returned nothing`;
|
|
282
296
|
}
|
|
283
297
|
|
|
284
298
|
const value = await quote;
|
|
@@ -336,6 +350,7 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
336
350
|
deadline,
|
|
337
351
|
Far('wakeObj', {
|
|
338
352
|
async wake(timestamp) {
|
|
353
|
+
await null;
|
|
339
354
|
try {
|
|
340
355
|
const quoteP = createQuote(calcAmountOut => ({
|
|
341
356
|
amountIn,
|
|
@@ -368,4 +383,4 @@ export function makeOnewayPriceAuthorityKit(opts) {
|
|
|
368
383
|
});
|
|
369
384
|
|
|
370
385
|
return { priceAuthority, adminFacet: { fireTriggers } };
|
|
371
|
-
}
|
|
386
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export function makeInitialTransform(priceOutPerIn: Ratio, priceAuthority: PriceAuthority, quoteMint: ERef<Mint<
|
|
2
|
-
|
|
1
|
+
export function makeInitialTransform(priceOutPerIn: Ratio, priceAuthority: PriceAuthority, quoteMint: globalThis.ERef<globalThis.Mint<"set", PriceDescription>>, brandIn: Brand<"nat">, brandOut: Brand<"nat">): PriceAuthority;
|
|
2
|
+
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
3
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
3
4
|
//# sourceMappingURL=priceAuthorityInitial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA8BO,oDAPI,KAAK,iHAGL,KAAK,CAAC,KAAK,CAAC,YACZ,KAAK,CAAC,KAAK,CAAC,kBA0FtB;oCAvG4F,4BAA4B;sCAA5B,4BAA4B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
// @jessie-check
|
|
3
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
3
4
|
|
|
4
5
|
import { E } from '@endo/far';
|
|
5
6
|
import { Far } from '@endo/marshal';
|
|
@@ -10,7 +11,9 @@ import { AmountMath } from '@agoric/ertp';
|
|
|
10
11
|
import { multiplyBy } from './ratio.js';
|
|
11
12
|
import { mintQuote } from './priceAuthorityTransform.js';
|
|
12
13
|
|
|
13
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
16
|
+
*/
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* Override `makeQuoteNotifier`, `quoteGiven` to provide an initial price
|
|
@@ -20,7 +23,7 @@ import { mintQuote } from './priceAuthorityTransform.js';
|
|
|
20
23
|
*
|
|
21
24
|
* @param {Ratio} priceOutPerIn
|
|
22
25
|
* @param {PriceAuthority} priceAuthority
|
|
23
|
-
* @param {ERef<Mint<'set'>>} quoteMint
|
|
26
|
+
* @param {ERef<Mint<'set', PriceDescription>>} quoteMint
|
|
24
27
|
* @param {Brand<'nat'>} brandIn
|
|
25
28
|
* @param {Brand<'nat'>} brandOut
|
|
26
29
|
* @returns {PriceAuthority}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export function provideQuoteMint(baggage:
|
|
1
|
+
export function provideQuoteMint(baggage: import("@agoric/vat-data").Baggage): globalThis.ERef<globalThis.Mint<"set", PriceDescription>>;
|
|
2
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
2
3
|
//# sourceMappingURL=priceAuthorityQuoteMint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityQuoteMint.d.ts","sourceRoot":"","sources":["priceAuthorityQuoteMint.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityQuoteMint.d.ts","sourceRoot":"","sources":["priceAuthorityQuoteMint.js"],"names":[],"mappings":"AAaO,0CAHI,OAAO,kBAAkB,EAAE,OAAO,6DAmB5C;sCAxB0G,4BAA4B"}
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from '@
|
|
6
|
-
import {
|
|
1
|
+
import { AssetKind, prepareIssuerKit } from '@agoric/ertp';
|
|
2
|
+
import { provideDurableMapStore } from '@agoric/vat-data';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @import {EOnly} from '@endo/eventual-send';
|
|
6
|
+
* @import {MutableQuote, PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
7
|
+
*/
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
10
11
|
* @param {import('@agoric/vat-data').Baggage} baggage
|
|
12
|
+
* @returns {ERef<Mint<'set', PriceDescription>>}
|
|
11
13
|
*/
|
|
12
14
|
export const provideQuoteMint = baggage => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'quote',
|
|
29
|
-
AssetKind.SET,
|
|
30
|
-
).mint;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return baggageQuoteMint;
|
|
15
|
+
const issuerBaggage = provideDurableMapStore(
|
|
16
|
+
baggage,
|
|
17
|
+
'quoteMintIssuerBaggage',
|
|
18
|
+
);
|
|
19
|
+
/** @type {IssuerKit<'set', PriceDescription>} */
|
|
20
|
+
// @ts-expect-error cast
|
|
21
|
+
const issuerKit = prepareIssuerKit(
|
|
22
|
+
issuerBaggage,
|
|
23
|
+
'quote',
|
|
24
|
+
AssetKind.SET,
|
|
25
|
+
undefined,
|
|
26
|
+
undefined,
|
|
27
|
+
{ recoverySetsOption: 'noRecoverySets' },
|
|
28
|
+
);
|
|
29
|
+
return issuerKit.mint;
|
|
34
30
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export function mintQuote(quoteBrand: Brand<
|
|
1
|
+
export function mintQuote(quoteBrand: Brand<"set">, amountIn: Amount<"nat">, amountOut: Amount<"nat">, timer: import("@agoric/time").TimerService, timestamp: import("@agoric/time").TimestampRecord, quoteMint: globalThis.ERef<globalThis.Mint<"set", PriceDescription>>): Promise<PriceQuote>;
|
|
2
2
|
export function makePriceAuthorityTransform({ quoteMint, sourcePriceAuthority, sourceBrandIn, sourceBrandOut, actualBrandIn, actualBrandOut, makeSourceAmountIn, makeSourceAmountOut, transformSourceAmountIn, transformSourceAmountOut, }: {
|
|
3
|
-
quoteMint: ERef<Mint<
|
|
4
|
-
sourcePriceAuthority: ERef<PriceAuthority>;
|
|
5
|
-
sourceBrandIn: Brand<
|
|
6
|
-
sourceBrandOut: Brand<
|
|
7
|
-
actualBrandIn?: Brand<"nat"> | undefined;
|
|
8
|
-
actualBrandOut?: Brand<"nat"> | undefined;
|
|
9
|
-
makeSourceAmountIn?: ((amountIn: Amount<
|
|
10
|
-
makeSourceAmountOut?: ((amountOut: Amount<
|
|
11
|
-
transformSourceAmountIn?: ((sourceAmountIn: Amount<
|
|
12
|
-
transformSourceAmountOut?: ((sourceAmountOut: Amount<
|
|
3
|
+
quoteMint: globalThis.ERef<globalThis.Mint<"set", PriceDescription>>;
|
|
4
|
+
sourcePriceAuthority: globalThis.ERef<PriceAuthority>;
|
|
5
|
+
sourceBrandIn: Brand<"nat">;
|
|
6
|
+
sourceBrandOut: Brand<"nat">;
|
|
7
|
+
actualBrandIn?: globalThis.Brand<"nat"> | undefined;
|
|
8
|
+
actualBrandOut?: globalThis.Brand<"nat"> | undefined;
|
|
9
|
+
makeSourceAmountIn?: ((amountIn: Amount<"nat">) => Amount<"nat">) | undefined;
|
|
10
|
+
makeSourceAmountOut?: ((amountOut: Amount<"nat">) => Amount<"nat">) | undefined;
|
|
11
|
+
transformSourceAmountIn?: ((sourceAmountIn: Amount<"nat">) => Amount<"nat">) | undefined;
|
|
12
|
+
transformSourceAmountOut?: ((sourceAmountOut: Amount<"nat">) => Amount<"nat">) | undefined;
|
|
13
13
|
}): Promise<PriceAuthority>;
|
|
14
|
-
|
|
14
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
15
|
+
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
16
|
+
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
15
17
|
//# sourceMappingURL=priceAuthorityTransform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityTransform.d.ts","sourceRoot":"","sources":["priceAuthorityTransform.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityTransform.d.ts","sourceRoot":"","sources":["priceAuthorityTransform.js"],"names":[],"mappings":"AAoBO,sCARI,KAAK,CAAC,KAAK,CAAC,YACZ,MAAM,CAAC,KAAK,CAAC,aACb,MAAM,CAAC,KAAK,CAAC,SACb,OAAO,cAAc,EAAE,YAAY,aACnC,OAAO,cAAc,EAAE,eAAe,6FAqBhD;AAeM;;;mBATI,KAAK,CAAC,KAAK,CAAC;oBACZ,KAAK,CAAC,KAAK,CAAC;;;qCAGD,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;uCAC9B,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;gDAC1B,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;kDAC9B,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;4BA4N3D;sCAtQ6E,4BAA4B;gCAA5B,4BAA4B;oCAA5B,4BAA4B"}
|
|
@@ -4,15 +4,18 @@ import { Fail, assert } from '@agoric/assert';
|
|
|
4
4
|
import { AmountMath } from '@agoric/ertp';
|
|
5
5
|
import { makeNotifier } from '@agoric/notifier';
|
|
6
6
|
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @import {EOnly} from '@endo/eventual-send';
|
|
9
|
+
* @import {MutableQuote, PriceAuthority, PriceQuote, PriceDescription,} from '@agoric/zoe/tools/types.js';
|
|
10
|
+
*/
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* @param {Brand<'set'>} quoteBrand
|
|
11
14
|
* @param {Amount<'nat'>} amountIn
|
|
12
15
|
* @param {Amount<'nat'>} amountOut
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {import('@agoric/time').
|
|
15
|
-
* @param {ERef<Mint<'set'>>} quoteMint
|
|
16
|
+
* @param {import('@agoric/time').TimerService} timer
|
|
17
|
+
* @param {import('@agoric/time').TimestampRecord} timestamp
|
|
18
|
+
* @param {ERef<Mint<'set', PriceDescription>>} quoteMint
|
|
16
19
|
* @returns {Promise<PriceQuote>}
|
|
17
20
|
*/
|
|
18
21
|
export const mintQuote = async (
|
|
@@ -36,7 +39,7 @@ export const mintQuote = async (
|
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* @param {object} opts
|
|
39
|
-
* @param {ERef<Mint<'set'>>} opts.quoteMint
|
|
42
|
+
* @param {ERef<Mint<'set', PriceDescription>>} opts.quoteMint
|
|
40
43
|
* @param {ERef<PriceAuthority>} opts.sourcePriceAuthority
|
|
41
44
|
* @param {Brand<'nat'>} opts.sourceBrandIn
|
|
42
45
|
* @param {Brand<'nat'>} opts.sourceBrandOut
|
|
@@ -87,9 +90,8 @@ export const makePriceAuthorityTransform = async ({
|
|
|
87
90
|
sourceBrandOut,
|
|
88
91
|
);
|
|
89
92
|
|
|
90
|
-
const { value: sourceQuoteValue } =
|
|
91
|
-
sourceQuotePayment
|
|
92
|
-
);
|
|
93
|
+
const { value: sourceQuoteValue } =
|
|
94
|
+
await E(sourceQuoteIssuer).getAmountOf(sourceQuotePayment);
|
|
93
95
|
|
|
94
96
|
sourceQuoteValue.length === 1 ||
|
|
95
97
|
Fail`sourceQuoteValue.length ${sourceQuoteValue.length} is not 1`;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export function getPriceDescription(quote: PriceQuote): PriceDescription;
|
|
2
|
-
export function getAmountIn(quote: PriceQuote):
|
|
3
|
-
export function getAmountOut(quote: PriceQuote):
|
|
4
|
-
/** @type {(quote: PriceQuote) => import('@agoric/time
|
|
5
|
-
export const getTimestamp: (quote: PriceQuote) => import(
|
|
6
|
-
export function unitAmount(brand: Brand<
|
|
2
|
+
export function getAmountIn(quote: PriceQuote): import("@agoric/ertp/src/types.js").NatAmount;
|
|
3
|
+
export function getAmountOut(quote: PriceQuote): import("@agoric/ertp/src/types.js").NatAmount;
|
|
4
|
+
/** @type {(quote: PriceQuote) => import('@agoric/time').Timestamp} */
|
|
5
|
+
export const getTimestamp: (quote: PriceQuote) => import("@agoric/time").Timestamp;
|
|
6
|
+
export function unitAmount(brand: Brand<"nat">): Promise<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
7
|
+
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
8
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
7
9
|
//# sourceMappingURL=priceQuote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAqBO,yEAIN;AAGM,8FAAgE;AAEhE,+FAAkE;AACzE,sEAAsE;AACtE,kDADkC,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,KAAK,CAAC,KAAK,CAAC,0DAMvB;gCAjC4F,4BAA4B;sCAA5B,4BAA4B"}
|
|
@@ -4,6 +4,10 @@ import { AmountMath } from '@agoric/ertp';
|
|
|
4
4
|
import { Nat } from '@endo/nat';
|
|
5
5
|
import { E } from '@endo/eventual-send';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
9
|
+
*/
|
|
10
|
+
|
|
7
11
|
const { Fail } = assert;
|
|
8
12
|
|
|
9
13
|
// PriceAuthorities return quotes as a pair of an amount and a payment, both
|
|
@@ -25,7 +29,7 @@ export const getPriceDescription = quote => {
|
|
|
25
29
|
export const getAmountIn = quote => getPriceDescription(quote).amountIn;
|
|
26
30
|
/** @param {PriceQuote} quote */
|
|
27
31
|
export const getAmountOut = quote => getPriceDescription(quote).amountOut;
|
|
28
|
-
/** @type {(quote: PriceQuote) => import('@agoric/time
|
|
32
|
+
/** @type {(quote: PriceQuote) => import('@agoric/time').Timestamp} */
|
|
29
33
|
export const getTimestamp = quote => getPriceDescription(quote).timestamp;
|
|
30
34
|
|
|
31
35
|
/** @param {Brand<'nat'>} brand */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function assertIsRatio(ratio: any): void;
|
|
2
|
-
export function makeRatio(numerator: bigint, numeratorBrand: Brand, denominator?: bigint | undefined, denominatorBrand?: Brand
|
|
2
|
+
export function makeRatio(numerator: bigint, numeratorBrand: Brand, denominator?: bigint | undefined, denominatorBrand?: globalThis.Brand | undefined): Ratio;
|
|
3
3
|
export function makeRatioFromAmounts(numeratorAmount: Amount, denominatorAmount: Amount): Ratio;
|
|
4
4
|
/** @type {ScaleAmount} */
|
|
5
5
|
export const floorMultiplyBy: ScaleAmount;
|
|
@@ -21,7 +21,7 @@ export function oneMinus(ratio: Ratio): Ratio;
|
|
|
21
21
|
export function ratioGTE(left: Ratio, right: Ratio): boolean;
|
|
22
22
|
export function ratiosSame(left: Ratio, right: Ratio): boolean;
|
|
23
23
|
export function quantize(ratio: Ratio, newDen: bigint): Ratio;
|
|
24
|
-
export function parseRatio(numeric: ParsableNumber, numeratorBrand: Brand, denominatorBrand?: Brand
|
|
24
|
+
export function parseRatio(numeric: ParsableNumber, numeratorBrand: Brand, denominatorBrand?: globalThis.Brand | undefined): Ratio;
|
|
25
25
|
export function assertParsableNumber(specimen: unknown): asserts specimen is ParsableNumber;
|
|
26
26
|
export function ratioToNumber(ratio: Ratio): number;
|
|
27
27
|
export type ParsableNumber = bigint | number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ratio.d.ts","sourceRoot":"","sources":["ratio.js"],"names":[],"mappings":"AAwCO,gDAcN;AASM,qCANI,MAAM,kBACN,KAAK,sFAGH,KAAK,
|
|
1
|
+
{"version":3,"file":"ratio.d.ts","sourceRoot":"","sources":["ratio.js"],"names":[],"mappings":"AAwCO,gDAcN;AASM,qCANI,MAAM,kBACN,KAAK,sFAGH,KAAK,CAejB;AAOM,sDAJI,MAAM,qBACN,MAAM,GACJ,KAAK,CAYjB;AA2BD,0BAA0B;AAC1B,8BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,6BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,yBADW,WAAW,CAGpB;AA2BF,0BAA0B;AAC1B,4BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,2BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,uBADW,WAAW,CAGpB;AAMK,mCAHI,KAAK,GACH,KAAK,CAWjB;AAOM,gCAJI,KAAK,SACL,KAAK,GACH,KAAK,CAwBjB;AAOM,qCAJI,KAAK,SACL,KAAK,GACH,KAAK,CAmBjB;AAOM,qCAJI,KAAK,SACL,KAAK,GACH,KAAK,CA8BjB;AAQM,gCAHI,KAAK,GACH,KAAK,CAcjB;AAOM,+BAJI,KAAK,SACL,KAAK,GACH,OAAO,CAkBnB;AASM,iCAJI,KAAK,SACL,KAAK,GACH,OAAO,CAOnB;AASM,gCAJI,KAAK,UACL,MAAM,GACJ,KAAK,CAajB;AAaM,oCALI,cAAc,kBACd,KAAK,oDAEH,KAAK,CAmBjB;AAMM,+CAHI,OAAO,GACL,OAAO,CAAC,QAAQ,IAAI,cAAc,CAK9C;AAQM,qCAHI,KAAK,GACH,MAAM,CAMlB;6BAhDa,MAAM,GAAG,MAAM,GAAG,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="./types-ambient.js" />
|
|
2
2
|
import { q, Fail } from '@agoric/assert';
|
|
3
3
|
import { AmountMath } from '@agoric/ertp';
|
|
4
4
|
import { assertRecord } from '@endo/marshal';
|
|
@@ -70,7 +70,6 @@ export const makeRatio = (
|
|
|
70
70
|
denominator > 0n ||
|
|
71
71
|
Fail`No infinite ratios! Denominator was 0 ${q(denominatorBrand)}`;
|
|
72
72
|
|
|
73
|
-
// @ts-expect-error cast to return type because make() ensures
|
|
74
73
|
return harden({
|
|
75
74
|
numerator: AmountMath.make(numeratorBrand, numerator),
|
|
76
75
|
denominator: AmountMath.make(denominatorBrand, denominator),
|
|
@@ -98,6 +97,7 @@ export const makeRatioFromAmounts = (numeratorAmount, denominatorAmount) => {
|
|
|
98
97
|
* @param {Amount<'nat'>} amount
|
|
99
98
|
* @param {Ratio} ratio
|
|
100
99
|
* @param {*} divideOp
|
|
100
|
+
* @returns {Amount<'nat'>}
|
|
101
101
|
*/
|
|
102
102
|
const multiplyHelper = (amount, ratio, divideOp) => {
|
|
103
103
|
AmountMath.coerce(amount.brand, amount);
|
|
@@ -107,12 +107,14 @@ const multiplyHelper = (amount, ratio, divideOp) => {
|
|
|
107
107
|
ratio.denominator.brand,
|
|
108
108
|
)}`;
|
|
109
109
|
|
|
110
|
-
return
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
return /** @type {Amount<'nat'>} */ (
|
|
111
|
+
AmountMath.make(
|
|
112
|
+
ratio.numerator.brand,
|
|
113
|
+
divideOp(
|
|
114
|
+
multiply(amount.value, ratio.numerator.value),
|
|
115
|
+
ratio.denominator.value,
|
|
116
|
+
),
|
|
117
|
+
)
|
|
116
118
|
);
|
|
117
119
|
};
|
|
118
120
|
|
|
@@ -135,6 +137,7 @@ export const multiplyBy = (amount, ratio) => {
|
|
|
135
137
|
* @param {Amount<'nat'>} amount
|
|
136
138
|
* @param {Ratio} ratio
|
|
137
139
|
* @param {*} divideOp
|
|
140
|
+
* @returns {Amount<'nat'>}
|
|
138
141
|
*/
|
|
139
142
|
const divideHelper = (amount, ratio, divideOp) => {
|
|
140
143
|
AmountMath.coerce(amount.brand, amount);
|
|
@@ -144,12 +147,14 @@ const divideHelper = (amount, ratio, divideOp) => {
|
|
|
144
147
|
ratio.numerator.brand,
|
|
145
148
|
)}`;
|
|
146
149
|
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
return /** @type {Amount<'nat'>} */ (
|
|
151
|
+
AmountMath.make(
|
|
152
|
+
ratio.denominator.brand,
|
|
153
|
+
divideOp(
|
|
154
|
+
multiply(amount.value, ratio.denominator.value),
|
|
155
|
+
ratio.numerator.value,
|
|
156
|
+
),
|
|
157
|
+
)
|
|
153
158
|
);
|
|
154
159
|
};
|
|
155
160
|
|
|
@@ -378,7 +383,6 @@ export const parseRatio = (
|
|
|
378
383
|
);
|
|
379
384
|
};
|
|
380
385
|
|
|
381
|
-
// eslint-disable-next-line jsdoc/require-returns-check
|
|
382
386
|
/**
|
|
383
387
|
* @param {unknown} specimen
|
|
384
388
|
* @returns {asserts specimen is ParsableNumber}
|