@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* any times have been missed. Compound interest will be calculated
|
|
6
6
|
* using the interestRate.
|
|
7
7
|
*/
|
|
8
|
-
type PeriodNotifier = Notifier<import(
|
|
8
|
+
type PeriodNotifier = Notifier<import("@agoric/time").TimestampRecord>;
|
|
9
9
|
/**
|
|
10
10
|
* The running contract instance for an Autoswap installation. The
|
|
11
11
|
* publicFacet from the Autoswap
|
|
@@ -24,14 +24,14 @@ type LoanTerms = {
|
|
|
24
24
|
* Used for getting the current value of collateral and setting
|
|
25
25
|
* liquidation triggers.
|
|
26
26
|
*/
|
|
27
|
-
priceAuthority: PriceAuthority;
|
|
27
|
+
priceAuthority: import("../../../tools/types.js").PriceAuthority;
|
|
28
28
|
periodNotifier: PeriodNotifier;
|
|
29
29
|
/**
|
|
30
30
|
* The rate in basis points that will be multiplied with the debt on
|
|
31
31
|
* every period to compound interest.
|
|
32
32
|
*/
|
|
33
33
|
interestRate: Ratio;
|
|
34
|
-
interestPeriod: import(
|
|
34
|
+
interestPeriod: import("@agoric/time").RelativeTime;
|
|
35
35
|
loanBrand: Brand;
|
|
36
36
|
collateralBrand: Brand;
|
|
37
37
|
};
|
|
@@ -54,12 +54,12 @@ type BorrowerConfigProperties = {
|
|
|
54
54
|
/**
|
|
55
55
|
* A function to get the current debt
|
|
56
56
|
*/
|
|
57
|
-
getDebt: () => Amount<
|
|
57
|
+
getDebt: () => Amount<"nat">;
|
|
58
58
|
/**
|
|
59
59
|
* PromiseKit that includes a promise that resolves to a PriceQuote
|
|
60
60
|
* when liquidation is triggered
|
|
61
61
|
*/
|
|
62
|
-
liquidationPromiseKit: PromiseRecord<PriceQuote>;
|
|
62
|
+
liquidationPromiseKit: PromiseRecord<import("../../../tools/types.js").PriceQuote>;
|
|
63
63
|
};
|
|
64
64
|
type BorrowerConfigPropertiesMinusDebt = {
|
|
65
65
|
/**
|
|
@@ -71,7 +71,7 @@ type BorrowerConfigPropertiesMinusDebt = {
|
|
|
71
71
|
* PromiseKit that includes a promise that resolves to a PriceQuote
|
|
72
72
|
* when liquidation is triggered
|
|
73
73
|
*/
|
|
74
|
-
liquidationPromiseKit: PromiseRecord<PriceQuote>;
|
|
74
|
+
liquidationPromiseKit: PromiseRecord<import("../../../tools/types.js").PriceQuote>;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* The loan has a lender, a borrower, and collateral escrowed.
|
|
@@ -87,9 +87,8 @@ type MakeCloseLoanInvitation = (zcf: ZCF, config: LoanConfigWithBorrower) => Pro
|
|
|
87
87
|
* after adding.
|
|
88
88
|
*/
|
|
89
89
|
type MakeAddCollateralInvitation = (zcf: ZCF, config: LoanConfigWithBorrower) => Promise<Invitation>;
|
|
90
|
-
type Liquidate = (zcf: ZCF, config: LoanConfigWithBorrower) => void;
|
|
91
90
|
type MakeDebtCalculator = (debtCalculatorConfig: DebtCalculatorConfig) => any;
|
|
92
|
-
type CalcInterestFn = (oldDebt: Amount<
|
|
91
|
+
type CalcInterestFn = (oldDebt: Amount<"nat">, interestRate: Ratio) => Amount<"nat">;
|
|
93
92
|
type DebtCalculatorConfig = {
|
|
94
93
|
/**
|
|
95
94
|
* A function to calculate the interest, given the debt value and an
|
|
@@ -99,7 +98,7 @@ type DebtCalculatorConfig = {
|
|
|
99
98
|
/**
|
|
100
99
|
* The debt at the start of the loan, in Loan brand
|
|
101
100
|
*/
|
|
102
|
-
originalDebt: Amount<
|
|
101
|
+
originalDebt: Amount<"nat">;
|
|
103
102
|
/**
|
|
104
103
|
* The AsyncIterable to notify when a period has occurred
|
|
105
104
|
*/
|
|
@@ -108,24 +107,24 @@ type DebtCalculatorConfig = {
|
|
|
108
107
|
/**
|
|
109
108
|
* the period at which the outstanding debt increases by the interestRate
|
|
110
109
|
*/
|
|
111
|
-
interestPeriod: import(
|
|
110
|
+
interestPeriod: import("@agoric/time").RelativeTime;
|
|
112
111
|
zcf: ZCF;
|
|
113
112
|
configMinusGetDebt: LoanConfigWithBorrowerMinusDebt;
|
|
114
113
|
/**
|
|
115
114
|
* The starting point from which to calculate
|
|
116
115
|
* interest.
|
|
117
116
|
*/
|
|
118
|
-
basetime: import(
|
|
117
|
+
basetime: import("@agoric/time").Timestamp;
|
|
119
118
|
};
|
|
120
119
|
type ConfigMinusGetDebt = {
|
|
121
120
|
collateralSeat: ZCFSeat;
|
|
122
121
|
liquidationPromiseKit: PromiseRecord<any>;
|
|
123
122
|
mmr?: bigint | undefined;
|
|
124
|
-
autoswapInstance: Handle<
|
|
125
|
-
priceAuthority: PriceAuthority;
|
|
123
|
+
autoswapInstance: Handle<"Instance">;
|
|
124
|
+
priceAuthority: import("../../../tools/types.js").PriceAuthority;
|
|
126
125
|
periodNotifier: PeriodNotifier;
|
|
127
126
|
interestRate: bigint;
|
|
128
|
-
interestPeriod: import(
|
|
127
|
+
interestPeriod: import("@agoric/time").RelativeTime;
|
|
129
128
|
lenderSeat: ZCFSeat;
|
|
130
129
|
};
|
|
131
130
|
type BorrowFacet = {
|
|
@@ -144,11 +143,11 @@ type BorrowFacet = {
|
|
|
144
143
|
* triggered the liquidation. This may be lower than expected if the
|
|
145
144
|
* price is moving quickly.
|
|
146
145
|
*/
|
|
147
|
-
getLiquidationPromise: () => Promise<PriceQuote>;
|
|
146
|
+
getLiquidationPromise: () => Promise<import("../../../tools/types.js").PriceQuote>;
|
|
148
147
|
/**
|
|
149
148
|
* Get the timestamp at which the debt was most recently recalculated.
|
|
150
149
|
*/
|
|
151
|
-
getLastCalculationTimestamp: () => import(
|
|
150
|
+
getLastCalculationTimestamp: () => import("@agoric/time").Timestamp;
|
|
152
151
|
/**
|
|
153
152
|
* Get a Notifier that will be updated when the current debt (an Amount with the Loan
|
|
154
153
|
* Brand) changes. This will increase as interest is added.
|
|
@@ -159,4 +158,4 @@ type BorrowFacet = {
|
|
|
159
158
|
*/
|
|
160
159
|
getRecentCollateralAmount: () => Amount;
|
|
161
160
|
};
|
|
162
|
-
//# sourceMappingURL=types.d.ts.map
|
|
161
|
+
//# sourceMappingURL=types-ambient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;sBACa,QAAQ,CAAC,OAAO,cAAc,EAAE,eAAe,CAAC;;;;;;;wBAUhD,QAAQ;;;;;;SAUP,KAAK;sBAGL,gBAAgB;;;;;oBAEhB,OAAO,yBAAyB,EAAE,cAAc;oBAKhD,cAAc;;;;;kBAEd,KAAK;oBAIL,OAAO,cAAc,EAAE,YAAY;eAEnC,KAAK;qBACL,KAAK;;;;;;gBAKL,OAAO;;;;;4BAMR,SAAS,GAAG,kBAAkB;;;;;;oBAQ7B,OAAO;;;;aAKP,MAAM,MAAM,CAAC,KAAK,CAAC;;;;;2BAInB,aAAa,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;;;;oBAS3D,OAAO;;;;;2BAKP,aAAa,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;;8BAO5D,oBAAoB,GAAG,wBAAwB;uCAM/C,oBAAoB,GAAG,iCAAiC;iCAM1D,GAAG,UACH,sBAAsB;gCAKtB,GAAG,UACH,SAAS,KACP,OAAO,CAAC,UAAU,CAAC;kCAKrB,GAAG,UACH,oBAAoB,KAClB,OAAO,CAAC,UAAU,CAAC;qCAKrB,GAAG,UACH,sBAAsB,KACpB,OAAO,CAAC,UAAU,CAAC;;;;;yCAQrB,GAAG,UACH,sBAAsB,KACpB,OAAO,CAAC,UAAU,CAAC;iDAKrB,oBAAoB;gCAKpB,MAAM,CAAC,KAAK,CAAC,gBACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC;;;;;;oBAKZ,cAAc;;;;kBAKd,MAAM,CAAC,KAAK,CAAC;;;;oBAIb,cAAc;kBAId,KAAK;;;;oBACL,OAAO,cAAc,EAAE,YAAY;SAInC,GAAG;wBAEH,+BAA+B;;;;;cAC/B,OAAO,cAAc,EAAE,SAAS;;;oBAMhC,OAAO;2BACP,aAAa,CAAC,GAAG,CAAC;;sBAElB,MAAM,CAAC,UAAU,CAAC;oBAClB,OAAO,yBAAyB,EAAE,cAAc;oBAChD,cAAc;kBACd,MAAM;oBACN,OAAO,cAAc,EAAE,YAAY;gBACnC,OAAO;;;;;;;6BAMP,MAAM,OAAO,CAAC,UAAU,CAAC;;;;iCAKzB,MAAM,OAAO,CAAC,UAAU,CAAC;;;;;;;2BAIzB,MAAM,OAAO,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;iCAO3D,MAAM,OAAO,cAAc,EAAE,SAAS;;;;;qBAItC,MAAM,QAAQ,CAAC,MAAM,CAAC;;;;+BAKtB,MAAM,MAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {Notifier<import('@agoric/time
|
|
2
|
+
* @typedef {Notifier<import('@agoric/time').TimestampRecord>} PeriodNotifier
|
|
3
3
|
*
|
|
4
4
|
* The Notifier that provides notifications that periods have passed.
|
|
5
5
|
* Since notifiers can't be relied on to produce an output every time
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @property {AutoswapInstance} autoswapInstance
|
|
26
26
|
*
|
|
27
|
-
* @property {PriceAuthority} priceAuthority
|
|
27
|
+
* @property {import('../../../tools/types.js').PriceAuthority} priceAuthority
|
|
28
28
|
*
|
|
29
29
|
* Used for getting the current value of collateral and setting
|
|
30
30
|
* liquidation triggers.
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* The rate in basis points that will be multiplied with the debt on
|
|
36
36
|
* every period to compound interest.
|
|
37
37
|
*
|
|
38
|
-
* @property {import('@agoric/time
|
|
38
|
+
* @property {import('@agoric/time').RelativeTime} interestPeriod
|
|
39
39
|
*
|
|
40
40
|
* @property {Brand} loanBrand
|
|
41
41
|
* @property {Brand} collateralBrand
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
*
|
|
67
67
|
* A function to get the current debt
|
|
68
68
|
*
|
|
69
|
-
* @property {PromiseRecord<PriceQuote>} liquidationPromiseKit
|
|
69
|
+
* @property {PromiseRecord<import('../../../tools/types.js').PriceQuote>} liquidationPromiseKit
|
|
70
70
|
*
|
|
71
71
|
* PromiseKit that includes a promise that resolves to a PriceQuote
|
|
72
72
|
* when liquidation is triggered
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
* The ZCFSeat holding the collateral in escrow after the borrower
|
|
81
81
|
* escrows it
|
|
82
82
|
*
|
|
83
|
-
* @property {PromiseRecord<PriceQuote>} liquidationPromiseKit
|
|
83
|
+
* @property {PromiseRecord<import('../../../tools/types.js').PriceQuote>} liquidationPromiseKit
|
|
84
84
|
*
|
|
85
85
|
* PromiseKit that includes a promise that resolves to a PriceQuote
|
|
86
86
|
* when liquidation is triggered
|
|
@@ -134,13 +134,6 @@
|
|
|
134
134
|
* @returns {Promise<Invitation>} addCollateralInvitation
|
|
135
135
|
*/
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
* @callback Liquidate
|
|
139
|
-
* @param {ZCF} zcf
|
|
140
|
-
* @param {LoanConfigWithBorrower} config
|
|
141
|
-
* @returns {void}
|
|
142
|
-
*/
|
|
143
|
-
|
|
144
137
|
/**
|
|
145
138
|
* @callback MakeDebtCalculator
|
|
146
139
|
* @param {DebtCalculatorConfig} debtCalculatorConfig
|
|
@@ -169,14 +162,14 @@
|
|
|
169
162
|
* The AsyncIterable to notify when a period has occurred
|
|
170
163
|
*
|
|
171
164
|
* @property {Ratio} interestRate
|
|
172
|
-
* @property {import('@agoric/time
|
|
165
|
+
* @property {import('@agoric/time').RelativeTime} interestPeriod
|
|
173
166
|
*
|
|
174
167
|
* the period at which the outstanding debt increases by the interestRate
|
|
175
168
|
*
|
|
176
169
|
* @property {ZCF} zcf
|
|
177
170
|
*
|
|
178
171
|
* @property {LoanConfigWithBorrowerMinusDebt} configMinusGetDebt
|
|
179
|
-
* @property {import('@agoric/time
|
|
172
|
+
* @property {import('@agoric/time').Timestamp} basetime The starting point from which to calculate
|
|
180
173
|
* interest.
|
|
181
174
|
*/
|
|
182
175
|
|
|
@@ -186,10 +179,10 @@
|
|
|
186
179
|
* @property {PromiseRecord<any>} liquidationPromiseKit
|
|
187
180
|
* @property {bigint} [mmr]
|
|
188
181
|
* @property {Handle<'Instance'>} autoswapInstance
|
|
189
|
-
* @property {PriceAuthority} priceAuthority
|
|
182
|
+
* @property {import('../../../tools/types.js').PriceAuthority} priceAuthority
|
|
190
183
|
* @property {PeriodNotifier} periodNotifier
|
|
191
184
|
* @property {bigint} interestRate
|
|
192
|
-
* @property {import('@agoric/time
|
|
185
|
+
* @property {import('@agoric/time').RelativeTime} interestPeriod
|
|
193
186
|
* @property {ZCFSeat} lenderSeat
|
|
194
187
|
*/
|
|
195
188
|
|
|
@@ -205,14 +198,14 @@
|
|
|
205
198
|
*
|
|
206
199
|
* Make an invitation to add collateral to protect against liquidation
|
|
207
200
|
*
|
|
208
|
-
* @property {() => Promise<PriceQuote>} getLiquidationPromise
|
|
201
|
+
* @property {() => Promise<import('../../../tools/types.js').PriceQuote>} getLiquidationPromise
|
|
209
202
|
*
|
|
210
203
|
* Get a promise for a priceQuote that will resolve if liquidation
|
|
211
204
|
* occurs. The priceQuote is for the value of the collateral that
|
|
212
205
|
* triggered the liquidation. This may be lower than expected if the
|
|
213
206
|
* price is moving quickly.
|
|
214
207
|
*
|
|
215
|
-
* @property {() => import('@agoric/time
|
|
208
|
+
* @property {() => import('@agoric/time').Timestamp} getLastCalculationTimestamp
|
|
216
209
|
*
|
|
217
210
|
* Get the timestamp at which the debt was most recently recalculated.
|
|
218
211
|
*
|
|
@@ -45,7 +45,7 @@ export const makeDebtCalculator = debtCalculatorConfig => {
|
|
|
45
45
|
const config = { ...configMinusGetDebt, getDebt };
|
|
46
46
|
|
|
47
47
|
const periodObserver = Far('periodObserver', {
|
|
48
|
-
/** @type {(timestamp: import('@agoric/time
|
|
48
|
+
/** @type {(timestamp: import('@agoric/time').TimestampRecord) => void} */
|
|
49
49
|
updateState: timestamp => {
|
|
50
50
|
let updatedLoan = false;
|
|
51
51
|
// we could calculate the number of required updates and multiply by a power
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintAndSellNFT.d.ts","sourceRoot":"","sources":["mintAndSellNFT.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;
|
|
1
|
+
{"version":3,"file":"mintAndSellNFT.d.ts","sourceRoot":"","sources":["mintAndSellNFT.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAJW,GAAG,CAAC;IACd,SAAW,EAAE,MAAM,CAAC;CACjB,CAAC;;EA4FJ"}
|
|
@@ -11,12 +11,20 @@
|
|
|
11
11
|
* invitations for them, which when used to make an offer, will payout
|
|
12
12
|
* the specified amount of tokens.
|
|
13
13
|
*
|
|
14
|
-
* @
|
|
14
|
+
* @param {ZCF} zcf
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
export function start(zcf: ZCF): Promise<{
|
|
17
|
+
creatorFacet: {
|
|
18
|
+
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
19
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
20
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
21
|
+
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
22
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
23
|
+
}>;
|
|
24
|
+
publicFacet: {
|
|
25
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
26
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
27
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
28
|
+
}>;
|
|
21
29
|
}>;
|
|
22
30
|
//# sourceMappingURL=mintPayments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintPayments.d.ts","sourceRoot":"","sources":["mintPayments.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"mintPayments.d.ts","sourceRoot":"","sources":["mintPayments.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,2BAFW,GAAG;;;;;;;;;;;;;GAyCb"}
|
|
@@ -14,7 +14,7 @@ import { AmountMath } from '@agoric/ertp';
|
|
|
14
14
|
* invitations for them, which when used to make an offer, will payout
|
|
15
15
|
* the specified amount of tokens.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @param {ZCF} zcf
|
|
18
18
|
*/
|
|
19
19
|
const start = async zcf => {
|
|
20
20
|
// Create the internal token mint for a fungible digital asset. Note
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
export type OracleContract =
|
|
1
|
+
export type OracleContract = {
|
|
2
|
+
terms: StandardTerms & Record<string, unknown>;
|
|
3
|
+
} & {
|
|
4
|
+
creatorFacet: {
|
|
5
|
+
initialize(privateParams: any): OracleCreatorFacet;
|
|
6
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
7
|
+
initialize(privateParams: any): OracleCreatorFacet;
|
|
8
|
+
}>;
|
|
9
|
+
publicFacet: {
|
|
10
|
+
/** @param {OracleQuery} query */
|
|
11
|
+
query(query: OracleQuery): Promise<unknown>;
|
|
12
|
+
/** @param {OracleQuery} query */
|
|
13
|
+
makeQueryInvitation(query: OracleQuery): Promise<Invitation<unknown, never>>;
|
|
14
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
15
|
+
/** @param {OracleQuery} query */
|
|
16
|
+
query(query: OracleQuery): Promise<unknown>;
|
|
17
|
+
/** @param {OracleQuery} query */
|
|
18
|
+
makeQueryInvitation(query: OracleQuery): Promise<Invitation<unknown, never>>;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
2
21
|
export type OracleStart = typeof start;
|
|
22
|
+
/**
|
|
23
|
+
* @import {ContractOf} from '../zoeService/utils.js';
|
|
24
|
+
*/
|
|
3
25
|
/**
|
|
4
26
|
* This contract provides oracle queries for a fee or for free.
|
|
5
27
|
*
|
|
@@ -8,7 +30,7 @@ export type OracleStart = typeof start;
|
|
|
8
30
|
export function start(zcf: ZCF): Promise<{
|
|
9
31
|
creatorFacet: {
|
|
10
32
|
initialize(privateParams: any): OracleCreatorFacet;
|
|
11
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
33
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
12
34
|
initialize(privateParams: any): OracleCreatorFacet;
|
|
13
35
|
}>;
|
|
14
36
|
publicFacet: {
|
|
@@ -16,7 +38,7 @@ export function start(zcf: ZCF): Promise<{
|
|
|
16
38
|
query(query: OracleQuery): Promise<unknown>;
|
|
17
39
|
/** @param {OracleQuery} query */
|
|
18
40
|
makeQueryInvitation(query: OracleQuery): Promise<Invitation<unknown, never>>;
|
|
19
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
41
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
20
42
|
/** @param {OracleQuery} query */
|
|
21
43
|
query(query: OracleQuery): Promise<unknown>;
|
|
22
44
|
/** @param {OracleQuery} query */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["oracle.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["oracle.js"],"names":[],"mappings":";;;;;;;;;QAiEI,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;QAhBvB,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;;0BA6Bb,OAAO,KAAK;AAtG1B;;GAEG;AAEH;;;;GAIG;AACH,2BAFW,GAAG;;;;;;;QAkDV,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;QAhBvB,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;GAwB1B"}
|
package/src/contracts/oracle.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
1
2
|
import { assert, Fail } from '@agoric/assert';
|
|
2
3
|
import { Far } from '@endo/marshal';
|
|
3
4
|
import { AmountMath } from '@agoric/ertp';
|
|
@@ -5,6 +6,10 @@ import { AmountMath } from '@agoric/ertp';
|
|
|
5
6
|
import { E } from '@endo/eventual-send';
|
|
6
7
|
import { atomicTransfer } from '../contractSupport/index.js';
|
|
7
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @import {ContractOf} from '../zoeService/utils.js';
|
|
11
|
+
*/
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* This contract provides oracle queries for a fee or for free.
|
|
10
15
|
*
|
|
@@ -60,6 +65,7 @@ const start = async zcf => {
|
|
|
60
65
|
const publicFacet = Far('publicFacet', {
|
|
61
66
|
/** @param {OracleQuery} query */
|
|
62
67
|
async query(query) {
|
|
68
|
+
await null;
|
|
63
69
|
try {
|
|
64
70
|
assert(!revoked, revokedMsg);
|
|
65
71
|
const noFee = AmountMath.makeEmpty(feeBrand);
|
|
@@ -77,6 +83,7 @@ const start = async zcf => {
|
|
|
77
83
|
async makeQueryInvitation(query) {
|
|
78
84
|
/** @type {OfferHandler} */
|
|
79
85
|
const doQuery = async querySeat => {
|
|
86
|
+
await null;
|
|
80
87
|
try {
|
|
81
88
|
const fee = querySeat.getAmountAllocated('Fee', feeBrand);
|
|
82
89
|
const { requiredFee, reply } = await E(handler).onQuery(query, fee);
|
|
@@ -55,8 +55,8 @@ export function start(zcf: ZCF<Record<string, any>>): {
|
|
|
55
55
|
* @returns {Promise<Payment>}
|
|
56
56
|
*/
|
|
57
57
|
makeRemoveInventoryInvitation: () => Promise<Payment>;
|
|
58
|
-
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority:
|
|
59
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
58
|
+
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority: import("@agoric/time").TimerService, deadline: any) => Promise<Payment>;
|
|
59
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
60
60
|
/**
|
|
61
61
|
* The inventory can be added in bulk before any quotes are made
|
|
62
62
|
* or can be added immediately before a quote.
|
|
@@ -73,7 +73,7 @@ export function start(zcf: ZCF<Record<string, any>>): {
|
|
|
73
73
|
* @returns {Promise<Payment>}
|
|
74
74
|
*/
|
|
75
75
|
makeRemoveInventoryInvitation: () => Promise<Payment>;
|
|
76
|
-
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority:
|
|
76
|
+
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority: import("@agoric/time").TimerService, deadline: any) => Promise<Payment>;
|
|
77
77
|
}>;
|
|
78
78
|
};
|
|
79
79
|
//# sourceMappingURL=otcDesk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otcDesk.d.ts","sourceRoot":"","sources":["otcDesk.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,
|
|
1
|
+
{"version":3,"file":"otcDesk.d.ts","sourceRoot":"","sources":["otcDesk.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;QAoE/B;;;;;;WAMG;+FADU,OAAO,CAAC,OAAO,CAAC;QAM7B;;;;;;WAMG;6CADU,OAAO,CAAC,OAAO,CAAC;2BAzEpB,mBAAmB,UACnB,mBAAmB,iBACnB,OAAO,cAAc,EAAE,YAAY,YACnC,GAAG,KACD,OAAO,CAAC,OAAO,CAAC;;QAqD3B;;;;;;WAMG;+FADU,OAAO,CAAC,OAAO,CAAC;QAM7B;;;;;;WAMG;6CADU,OAAO,CAAC,OAAO,CAAC;2BAzEpB,mBAAmB,UACnB,mBAAmB,iBACnB,OAAO,cAAc,EAAE,YAAY,YACnC,GAAG,KACD,OAAO,CAAC,OAAO,CAAC;;EA8E9B"}
|
package/src/contracts/otcDesk.js
CHANGED
|
@@ -58,7 +58,7 @@ const start = zcf => {
|
|
|
58
58
|
*
|
|
59
59
|
* @param {AmountKeywordRecord} price
|
|
60
60
|
* @param {AmountKeywordRecord} assets
|
|
61
|
-
* @param {
|
|
61
|
+
* @param {import('@agoric/time').TimerService} timeAuthority
|
|
62
62
|
* @param {any} deadline
|
|
63
63
|
* @returns {Promise<Payment>}
|
|
64
64
|
*/
|
|
@@ -3,7 +3,94 @@ export type OraclePriceSubmission = Readonly<ParsableNumber | {
|
|
|
3
3
|
data: ParsableNumber;
|
|
4
4
|
}>;
|
|
5
5
|
export type Price = ParsableNumber | Ratio;
|
|
6
|
-
export type PriceAggregatorContract =
|
|
6
|
+
export type PriceAggregatorContract = {
|
|
7
|
+
terms: StandardTerms & {
|
|
8
|
+
timer: import("@agoric/time").TimerService;
|
|
9
|
+
POLL_INTERVAL: bigint;
|
|
10
|
+
brandIn: globalThis.Brand<"nat">;
|
|
11
|
+
brandOut: globalThis.Brand<"nat">;
|
|
12
|
+
unitAmountIn: import("@agoric/ertp/src/types.js").NatAmount;
|
|
13
|
+
};
|
|
14
|
+
privateArgs: {
|
|
15
|
+
marshaller: {
|
|
16
|
+
toCapData: import("@endo/marshal").ToCapData<unknown>;
|
|
17
|
+
fromCapData: import("@endo/marshal").FromCapData<unknown>;
|
|
18
|
+
serialize: import("@endo/marshal").ToCapData<unknown>;
|
|
19
|
+
unserialize: import("@endo/marshal").FromCapData<unknown>;
|
|
20
|
+
};
|
|
21
|
+
quoteMint?: globalThis.ERef<globalThis.Mint<"set", PriceDescription>> | undefined;
|
|
22
|
+
storageNode: globalThis.ERef<globalThis.StorageNode>;
|
|
23
|
+
};
|
|
24
|
+
} & {
|
|
25
|
+
creatorFacet: {
|
|
26
|
+
/**
|
|
27
|
+
* An "oracle invitation" is an invitation to be able to submit data to
|
|
28
|
+
* include in the priceAggregator's results.
|
|
29
|
+
*
|
|
30
|
+
* The offer result from this invitation is a OracleAdmin, which can be used
|
|
31
|
+
* directly to manage the price submissions as well as to terminate the
|
|
32
|
+
* relationship.
|
|
33
|
+
*
|
|
34
|
+
* @param {Instance | string} [oracleKey]
|
|
35
|
+
*/
|
|
36
|
+
makeOracleInvitation: (oracleKey?: string | Instance | undefined) => Promise<Invitation<{
|
|
37
|
+
admin: OracleAdmin<Price>;
|
|
38
|
+
invitationMakers: {
|
|
39
|
+
PushPrice: (price: ParsableNumber) => Promise<Invitation<void, undefined>>;
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
notifier?: globalThis.Notifier<OraclePriceSubmission> | undefined;
|
|
43
|
+
scaleValueOut?: number | undefined;
|
|
44
|
+
} | undefined>>;
|
|
45
|
+
/** @param {OracleKey} oracleKey */
|
|
46
|
+
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* @param {Instance | string} [oracleInstance]
|
|
49
|
+
* @param {OracleQuery} [query]
|
|
50
|
+
* @returns {Promise<OracleAdmin<Price>>}
|
|
51
|
+
*/
|
|
52
|
+
initOracle: (oracleInstance?: string | Instance | undefined, query?: OracleQuery | undefined) => Promise<OracleAdmin<Price>>;
|
|
53
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
54
|
+
/**
|
|
55
|
+
* An "oracle invitation" is an invitation to be able to submit data to
|
|
56
|
+
* include in the priceAggregator's results.
|
|
57
|
+
*
|
|
58
|
+
* The offer result from this invitation is a OracleAdmin, which can be used
|
|
59
|
+
* directly to manage the price submissions as well as to terminate the
|
|
60
|
+
* relationship.
|
|
61
|
+
*
|
|
62
|
+
* @param {Instance | string} [oracleKey]
|
|
63
|
+
*/
|
|
64
|
+
makeOracleInvitation: (oracleKey?: string | Instance | undefined) => Promise<Invitation<{
|
|
65
|
+
admin: OracleAdmin<Price>;
|
|
66
|
+
invitationMakers: {
|
|
67
|
+
PushPrice: (price: ParsableNumber) => Promise<Invitation<void, undefined>>;
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
notifier?: globalThis.Notifier<OraclePriceSubmission> | undefined;
|
|
71
|
+
scaleValueOut?: number | undefined;
|
|
72
|
+
} | undefined>>;
|
|
73
|
+
/** @param {OracleKey} oracleKey */
|
|
74
|
+
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* @param {Instance | string} [oracleInstance]
|
|
77
|
+
* @param {OracleQuery} [query]
|
|
78
|
+
* @returns {Promise<OracleAdmin<Price>>}
|
|
79
|
+
*/
|
|
80
|
+
initOracle: (oracleInstance?: string | Instance | undefined, query?: OracleQuery | undefined) => Promise<OracleAdmin<Price>>;
|
|
81
|
+
}>;
|
|
82
|
+
publicFacet: {
|
|
83
|
+
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
84
|
+
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
85
|
+
/** Diagnostic tool */
|
|
86
|
+
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
87
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
88
|
+
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
89
|
+
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
90
|
+
/** Diagnostic tool */
|
|
91
|
+
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
92
|
+
}>;
|
|
93
|
+
};
|
|
7
94
|
/**
|
|
8
95
|
* @deprecated use fluxAggregator
|
|
9
96
|
*
|
|
@@ -12,7 +99,7 @@ export type PriceAggregatorContract = ContractOf<typeof start>;
|
|
|
12
99
|
* is a stub until we complete what is now in `fluxAggregatorKit.js`.
|
|
13
100
|
*
|
|
14
101
|
* @param {ZCF<{
|
|
15
|
-
* timer: import('@agoric/time
|
|
102
|
+
* timer: import('@agoric/time').TimerService,
|
|
16
103
|
* POLL_INTERVAL: bigint,
|
|
17
104
|
* brandIn: Brand<'nat'>,
|
|
18
105
|
* brandOut: Brand<'nat'>,
|
|
@@ -20,19 +107,19 @@ export type PriceAggregatorContract = ContractOf<typeof start>;
|
|
|
20
107
|
* }>} zcf
|
|
21
108
|
* @param {{
|
|
22
109
|
* marshaller: Marshaller,
|
|
23
|
-
* quoteMint?: ERef<Mint<'set'>>,
|
|
110
|
+
* quoteMint?: ERef<Mint<'set', PriceDescription>>,
|
|
24
111
|
* storageNode: ERef<StorageNode>,
|
|
25
112
|
* }} privateArgs
|
|
26
113
|
*/
|
|
27
114
|
export function start(zcf: ZCF<{
|
|
28
|
-
timer: import(
|
|
115
|
+
timer: import("@agoric/time").TimerService;
|
|
29
116
|
POLL_INTERVAL: bigint;
|
|
30
|
-
brandIn: Brand<
|
|
31
|
-
brandOut: Brand<
|
|
32
|
-
unitAmountIn: Amount<
|
|
117
|
+
brandIn: Brand<"nat">;
|
|
118
|
+
brandOut: Brand<"nat">;
|
|
119
|
+
unitAmountIn: Amount<"nat">;
|
|
33
120
|
}>, privateArgs: {
|
|
34
121
|
marshaller: Marshaller;
|
|
35
|
-
quoteMint?: ERef<Mint<"set">> | undefined;
|
|
122
|
+
quoteMint?: globalThis.ERef<globalThis.Mint<"set", PriceDescription>> | undefined;
|
|
36
123
|
storageNode: ERef<StorageNode>;
|
|
37
124
|
}): Promise<{
|
|
38
125
|
creatorFacet: {
|
|
@@ -51,7 +138,10 @@ export function start(zcf: ZCF<{
|
|
|
51
138
|
invitationMakers: {
|
|
52
139
|
PushPrice: (price: ParsableNumber) => Promise<Invitation<void>>;
|
|
53
140
|
};
|
|
54
|
-
},
|
|
141
|
+
}, {
|
|
142
|
+
notifier?: globalThis.Notifier<OraclePriceSubmission> | undefined;
|
|
143
|
+
scaleValueOut?: number | undefined;
|
|
144
|
+
} | undefined>>;
|
|
55
145
|
/** @param {OracleKey} oracleKey */
|
|
56
146
|
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
57
147
|
/**
|
|
@@ -60,7 +150,7 @@ export function start(zcf: ZCF<{
|
|
|
60
150
|
* @returns {Promise<OracleAdmin<Price>>}
|
|
61
151
|
*/
|
|
62
152
|
initOracle: (oracleInstance?: string | Instance | undefined, query?: OracleQuery | undefined) => Promise<OracleAdmin<Price>>;
|
|
63
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
153
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
64
154
|
/**
|
|
65
155
|
* An "oracle invitation" is an invitation to be able to submit data to
|
|
66
156
|
* include in the priceAggregator's results.
|
|
@@ -76,7 +166,10 @@ export function start(zcf: ZCF<{
|
|
|
76
166
|
invitationMakers: {
|
|
77
167
|
PushPrice: (price: ParsableNumber) => Promise<Invitation<void>>;
|
|
78
168
|
};
|
|
79
|
-
},
|
|
169
|
+
}, {
|
|
170
|
+
notifier?: globalThis.Notifier<OraclePriceSubmission> | undefined;
|
|
171
|
+
scaleValueOut?: number | undefined;
|
|
172
|
+
} | undefined>>;
|
|
80
173
|
/** @param {OracleKey} oracleKey */
|
|
81
174
|
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
82
175
|
/**
|
|
@@ -87,15 +180,16 @@ export function start(zcf: ZCF<{
|
|
|
87
180
|
initOracle: (oracleInstance?: string | Instance | undefined, query?: OracleQuery | undefined) => Promise<OracleAdmin<Price>>;
|
|
88
181
|
}>;
|
|
89
182
|
publicFacet: {
|
|
90
|
-
getPriceAuthority(): PriceAuthority;
|
|
91
|
-
getSubscriber: () => StoredSubscriber<unknown>;
|
|
183
|
+
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
184
|
+
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
92
185
|
/** Diagnostic tool */
|
|
93
|
-
getRoundCompleteNotifier(): Promise<Notifier<any>>;
|
|
94
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
95
|
-
getPriceAuthority(): PriceAuthority;
|
|
96
|
-
getSubscriber: () => StoredSubscriber<unknown>;
|
|
186
|
+
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
187
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
188
|
+
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
189
|
+
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
97
190
|
/** Diagnostic tool */
|
|
98
|
-
getRoundCompleteNotifier(): Promise<Notifier<any>>;
|
|
191
|
+
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
99
192
|
}>;
|
|
100
193
|
}>;
|
|
194
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
101
195
|
//# sourceMappingURL=priceAggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAqCc,MAAM,GAAG,MAAM,GAAG,MAAM;oCAEzB,QAAQ,CAAC,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;oBAGlD,cAAc,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;QAoYhC;;;;;;;;;WASG;;;;mCAYsF,cAAc;;;;;;QA0CvG,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;;;QAhFH;;;;;;;;;WASG;;;;mCAYsF,cAAc;;;;;;QA0CvG,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;;;;;;QAkHH,sBAAsB;;;;;QAAtB,sBAAsB;;;;AAjkB1B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2BAbW,GAAG,CAAC;IACd,KAAO,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IAC7C,aAAe,EAAE,MAAM,CAAC;IACxB,OAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACxB,QAAU,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,YAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC3B,CAAC;gBAEU,UAAU;;iBAET,IAAI,CAAC,WAAW,CAAC;;;QA8W7B;;;;;;;;;WASG;;mBAY4B,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;yGADU,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;QA/ExC;;;;;;;;;WASG;;mBAY4B,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;yGADU,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;;;;QAmHxC,sBAAsB;;;;;QAAtB,sBAAsB;;;GAOzB;sCAplB4E,4BAA4B"}
|