@agoric/zoe 0.26.2 → 0.26.3-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.
- package/README.md +7 -7
- package/bundles/bundle-contractFacet-js-meta.json +628 -314
- package/bundles/bundle-contractFacet.d.ts +3 -3
- package/bundles/bundle-contractFacet.js +1 -1
- package/exported.js +1 -12
- package/package.json +75 -59
- package/src/cleanProposal.d.ts +2 -2
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +15 -12
- package/src/contractFacet/evalContractCode.d.ts.map +1 -1
- package/src/contractFacet/evalContractCode.js +2 -2
- 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/typeGuards.d.ts +8 -0
- package/src/contractFacet/typeGuards.d.ts.map +1 -0
- package/src/contractFacet/typeGuards.js +25 -0
- package/src/contractFacet/types-ambient.d.ts +271 -0
- package/src/contractFacet/types-ambient.js +1 -0
- package/src/contractFacet/vatRoot.d.ts +3 -3
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.d.ts +4 -2
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +7 -7
- package/src/contractFacet/zcfSeat.d.ts +4 -2
- package/src/contractFacet/zcfSeat.d.ts.map +1 -1
- package/src/contractFacet/zcfSeat.js +130 -7
- package/src/contractFacet/zcfZygote.d.ts +1 -2
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +102 -48
- 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 +33 -18
- package/src/contractSupport/priceAuthorityInitial.d.ts +3 -2
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +6 -3
- 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 +13 -11
- 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 +33 -119
- 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 +6 -12
- 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 +3 -3
- 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 +3 -2
- 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 +9 -5
- 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 +2 -1
- 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 +6 -2
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +10 -3
- 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 +25 -17
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +33 -32
- package/src/contracts/priceAggregatorTypes.d.ts +2 -2
- package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.d.ts +3 -4
- 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 +3 -4
- 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 +21 -32
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +19 -58
- package/src/issuerRecord.d.ts +1 -1
- package/src/issuerRecord.d.ts.map +1 -1
- package/src/issuerStorage.d.ts +3 -3
- 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 +114 -20
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +19 -20
- package/src/types-ambient.d.ts +41 -0
- package/src/types-ambient.d.ts.map +1 -0
- package/src/{types.js → types-ambient.js} +7 -15
- 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 +2 -1
- package/src/zoeService/internal-types.d.ts +12 -12
- 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 +82 -37
- package/src/zoeService/{types.d.ts → types-ambient.d.ts} +23 -28
- 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 +57 -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 +14 -8
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +39 -11
- package/src/zoeService/zoeSeat.d.ts +15 -45
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +215 -115
- package/src/zoeService/zoeStorageManager.d.ts +13 -47
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +13 -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 +16 -3
- package/tools/manualTimer.d.ts +17 -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 +8 -3
- package/tools/setup-zoe.d.ts +10 -6
- 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 -1171
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"AAiBO,8CAFI,OAAO,kBAAkB,EAAE,OAAO;;;;;EA8G5C"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { AmountMath } from '@agoric/ertp';
|
|
2
2
|
import { E } from '@endo/eventual-send';
|
|
3
3
|
import { q, Fail } from '@agoric/assert';
|
|
4
|
-
import { objectMap } from '@agoric/internal';
|
|
4
|
+
import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
|
|
5
5
|
import { provideDurableWeakMapStore } from '@agoric/vat-data';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/// <reference path="./types.js" />
|
|
8
8
|
import './internal-types.js';
|
|
9
9
|
|
|
10
10
|
import { cleanKeywords } from '../cleanProposal.js';
|
|
11
|
-
import { arrayToObj } from '../objArrayConversion.js';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Store the pool purses whose purpose is to escrow assets, with one
|
|
@@ -17,7 +16,7 @@ import { arrayToObj } from '../objArrayConversion.js';
|
|
|
17
16
|
* @param {import('@agoric/vat-data').Baggage} baggage
|
|
18
17
|
*/
|
|
19
18
|
export const provideEscrowStorage = baggage => {
|
|
20
|
-
/** @type {WeakMapStore<Brand,
|
|
19
|
+
/** @type {WeakMapStore<Brand, Purse>} */
|
|
21
20
|
const brandToPurse = provideDurableWeakMapStore(baggage, 'brandToPurse');
|
|
22
21
|
|
|
23
22
|
/** @type {CreatePurse} */
|
|
@@ -76,7 +75,6 @@ export const provideEscrowStorage = baggage => {
|
|
|
76
75
|
const depositPayments = async (proposal, payments) => {
|
|
77
76
|
const { give, want } = proposal;
|
|
78
77
|
const giveKeywords = Object.keys(give);
|
|
79
|
-
const wantKeywords = Object.keys(want);
|
|
80
78
|
const paymentKeywords = cleanKeywords(payments);
|
|
81
79
|
|
|
82
80
|
// Assert that all of the payment keywords are present in the give
|
|
@@ -91,35 +89,30 @@ export const provideEscrowStorage = baggage => {
|
|
|
91
89
|
)}`;
|
|
92
90
|
});
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// If any of these deposits hang or fail, then depositPayments
|
|
92
|
+
// If any of these deposits hang or fail, then this `await` also
|
|
97
93
|
// hangs or fails, the offer does not succeed, and any funds that
|
|
98
94
|
// were deposited into the pool purses are lost. We have a ticket
|
|
99
95
|
// for giving the user a refund of what was already deposited, and
|
|
100
96
|
// offer safety and payout liveness are still meaningful as long
|
|
101
97
|
// as issuers are well-behaved. For more, see
|
|
102
98
|
// https://github.com/Agoric/agoric-sdk/issues/1271
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
const emptyAmountsForWantKeywords = wantKeywords.map(keyword =>
|
|
116
|
-
AmountMath.makeEmptyFromAmount(want[keyword]),
|
|
117
|
-
);
|
|
99
|
+
const depositPs = objectMap(give, (amount, keyword) => {
|
|
100
|
+
payments[keyword] !== undefined ||
|
|
101
|
+
Fail`The ${q(
|
|
102
|
+
keyword,
|
|
103
|
+
)} keyword in proposal.give did not have an associated payment in the paymentKeywordRecord, which had keywords: ${q(
|
|
104
|
+
paymentKeywords,
|
|
105
|
+
)}`;
|
|
106
|
+
return doDepositPayment(payments[keyword], amount);
|
|
107
|
+
});
|
|
108
|
+
const deposits = await deeplyFulfilledObject(depositPs);
|
|
118
109
|
|
|
119
|
-
const initialAllocation =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
110
|
+
const initialAllocation = harden({
|
|
111
|
+
...objectMap(want, amount => AmountMath.makeEmptyFromAmount(amount)),
|
|
112
|
+
// Deposits should win in case of overlapping give/want keywords
|
|
113
|
+
// (which are not allowed as of 2024-01).
|
|
114
|
+
...deposits,
|
|
115
|
+
});
|
|
123
116
|
|
|
124
117
|
return initialAllocation;
|
|
125
118
|
};
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
export namespace defaultFeeIssuerConfig {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
let name: "ZDEFAULT";
|
|
3
|
+
let assetKind: "nat";
|
|
4
4
|
namespace displayInfo {
|
|
5
|
-
export
|
|
6
|
-
|
|
5
|
+
export let decimalPlaces: number;
|
|
6
|
+
let assetKind_1: "nat";
|
|
7
7
|
export { assetKind_1 as assetKind };
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @param {import('@agoric/vat-data').Baggage} zoeBaggage
|
|
12
12
|
* @param {FeeIssuerConfig} feeIssuerConfig
|
|
13
|
-
* @param {ShutdownWithFailure} shutdownZoeVat
|
|
13
|
+
* @param {import('@agoric/swingset-vat').ShutdownWithFailure} shutdownZoeVat
|
|
14
14
|
*/
|
|
15
|
-
export function prepareFeeMint(zoeBaggage:
|
|
15
|
+
export function prepareFeeMint(zoeBaggage: import("@agoric/vat-data").Baggage, feeIssuerConfig: FeeIssuerConfig, shutdownZoeVat: import("@agoric/swingset-vat").ShutdownWithFailure): import("@endo/exo").GuardedKit<{
|
|
16
16
|
feeMint: {
|
|
17
|
-
getFeeIssuerKit(allegedFeeMintAccess: any):
|
|
18
|
-
getFeeIssuer():
|
|
19
|
-
getFeeBrand():
|
|
20
|
-
};
|
|
21
|
-
feeMintAccess: {};
|
|
22
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
23
|
-
feeMint: {
|
|
24
|
-
getFeeIssuerKit(allegedFeeMintAccess: any): any;
|
|
25
|
-
getFeeIssuer(): any;
|
|
26
|
-
getFeeBrand(): any;
|
|
17
|
+
getFeeIssuerKit(allegedFeeMintAccess: any): globalThis.IssuerKit<"nat">;
|
|
18
|
+
getFeeIssuer(): globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
19
|
+
getFeeBrand(): globalThis.Brand<"nat">;
|
|
27
20
|
};
|
|
28
21
|
feeMintAccess: {};
|
|
29
22
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA4BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
makeDurableIssuerKit,
|
|
3
2
|
AssetKind,
|
|
4
|
-
prepareIssuerKit,
|
|
5
3
|
IssuerShape,
|
|
6
4
|
BrandShape,
|
|
5
|
+
prepareIssuerKit,
|
|
6
|
+
hasIssuer,
|
|
7
7
|
} from '@agoric/ertp';
|
|
8
8
|
import { initEmpty, M } from '@agoric/store';
|
|
9
9
|
import {
|
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
} from '@agoric/vat-data';
|
|
14
14
|
import { FeeMintAccessShape } from '../typeGuards.js';
|
|
15
15
|
|
|
16
|
-
const { Fail } = assert;
|
|
16
|
+
const { Fail, quote: q } = assert;
|
|
17
17
|
|
|
18
|
+
/** @deprecated Redundant. Just omit it. */
|
|
18
19
|
const FEE_MINT_KIT = 'FeeMintKit';
|
|
19
20
|
|
|
20
21
|
export const defaultFeeIssuerConfig = harden(
|
|
@@ -28,23 +29,28 @@ export const defaultFeeIssuerConfig = harden(
|
|
|
28
29
|
/**
|
|
29
30
|
* @param {import('@agoric/vat-data').Baggage} zoeBaggage
|
|
30
31
|
* @param {FeeIssuerConfig} feeIssuerConfig
|
|
31
|
-
* @param {ShutdownWithFailure} shutdownZoeVat
|
|
32
|
+
* @param {import('@agoric/swingset-vat').ShutdownWithFailure} shutdownZoeVat
|
|
32
33
|
*/
|
|
33
34
|
const prepareFeeMint = (zoeBaggage, feeIssuerConfig, shutdownZoeVat) => {
|
|
34
35
|
const mintBaggage = provideDurableMapStore(zoeBaggage, 'mintBaggage');
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
if (mintBaggage.has(FEE_MINT_KIT)) {
|
|
37
|
+
hasIssuer(mintBaggage) ||
|
|
38
|
+
Fail`Legacy ${q(
|
|
39
|
+
FEE_MINT_KIT,
|
|
40
|
+
)} must be redundant with normal storing of issuerKit in issuerBaggage`;
|
|
41
|
+
// Upgrade this legacy state by simply deleting it.
|
|
42
|
+
mintBaggage.delete(FEE_MINT_KIT);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const feeIssuerKit = /** @type {IssuerKit<'nat'>} */ (
|
|
46
|
+
prepareIssuerKit(
|
|
38
47
|
mintBaggage,
|
|
39
48
|
feeIssuerConfig.name,
|
|
40
49
|
feeIssuerConfig.assetKind,
|
|
41
50
|
feeIssuerConfig.displayInfo,
|
|
42
51
|
shutdownZoeVat,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
} else {
|
|
46
|
-
prepareIssuerKit(mintBaggage, shutdownZoeVat);
|
|
47
|
-
}
|
|
52
|
+
)
|
|
53
|
+
);
|
|
48
54
|
|
|
49
55
|
const FeeMintIKit = harden({
|
|
50
56
|
feeMint: M.interface('FeeMint', {
|
|
@@ -66,13 +72,13 @@ const prepareFeeMint = (zoeBaggage, feeIssuerConfig, shutdownZoeVat) => {
|
|
|
66
72
|
const { facets } = this;
|
|
67
73
|
facets.feeMintAccess === allegedFeeMintAccess ||
|
|
68
74
|
Fail`The object representing access to the fee brand mint was not provided`;
|
|
69
|
-
return
|
|
75
|
+
return feeIssuerKit;
|
|
70
76
|
},
|
|
71
77
|
getFeeIssuer() {
|
|
72
|
-
return
|
|
78
|
+
return feeIssuerKit.issuer;
|
|
73
79
|
},
|
|
74
80
|
getFeeBrand() {
|
|
75
|
-
return
|
|
81
|
+
return feeIssuerKit.brand;
|
|
76
82
|
},
|
|
77
83
|
},
|
|
78
84
|
// feeMintAccess is an opaque durable object representing the right to get
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zoeBaggage:
|
|
1
|
+
export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zoeBaggage: Baggage): import("@endo/exo").Guarded<{
|
|
2
2
|
installBundle(allegedBundle: any, bundleLabel: any): any;
|
|
3
|
-
installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<
|
|
4
|
-
unwrapInstallation(installation: any): {
|
|
5
|
-
bundleCap: any;
|
|
6
|
-
bundleID: string;
|
|
7
|
-
installation: any;
|
|
8
|
-
bundle?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
bundle: SourceBundle;
|
|
11
|
-
installation: any;
|
|
12
|
-
bundleCap?: undefined;
|
|
13
|
-
bundleID?: undefined;
|
|
14
|
-
};
|
|
15
|
-
getBundleIDFromInstallation(allegedInstallation: any): any;
|
|
16
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
17
|
-
installBundle(allegedBundle: any, bundleLabel: any): any;
|
|
18
|
-
installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<any>>;
|
|
3
|
+
installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<unknown>>;
|
|
19
4
|
unwrapInstallation(installation: any): {
|
|
20
5
|
bundleCap: any;
|
|
21
6
|
bundleID: string;
|
|
@@ -29,7 +14,7 @@ export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zo
|
|
|
29
14
|
};
|
|
30
15
|
getBundleIDFromInstallation(allegedInstallation: any): any;
|
|
31
16
|
}>;
|
|
32
|
-
export type BundleCap = import(
|
|
33
|
-
export type BundleID = import(
|
|
34
|
-
|
|
17
|
+
export type BundleCap = import("@agoric/swingset-vat").BundleCap;
|
|
18
|
+
export type BundleID = import("@agoric/swingset-vat").BundleID;
|
|
19
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
35
20
|
//# sourceMappingURL=installationStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAuBO,2DAHI,iBAAiB
|
|
1
|
+
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAuBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA+IjB;wBArJc,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;6BAC3B,kBAAkB"}
|
|
@@ -15,7 +15,7 @@ const { Fail, quote: q } = assert;
|
|
|
15
15
|
|
|
16
16
|
/** @typedef { import('@agoric/swingset-vat').BundleCap} BundleCap */
|
|
17
17
|
/** @typedef { import('@agoric/swingset-vat').BundleID} BundleID */
|
|
18
|
-
/** @
|
|
18
|
+
/** @import {Baggage} from '@agoric/vat-data' */
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @param {GetBundleCapForID} getBundleCapForID
|
|
@@ -33,20 +33,24 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
|
|
|
33
33
|
'installationsBundle',
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
+
/** @type {(bundleLabel: string) => Installation<unknown>} */
|
|
36
37
|
const makeBundleIDInstallation = prepareKind(
|
|
37
38
|
zoeBaggage,
|
|
38
39
|
'BundleIDInstallation',
|
|
39
40
|
bundleLabel => ({ bundleLabel }),
|
|
41
|
+
// @ts-expect-error cast without StartFunction property
|
|
40
42
|
{
|
|
41
43
|
getBundle: _context => Fail`bundleID-based Installation`,
|
|
42
44
|
getBundleLabel: ({ state: { bundleLabel } }) => bundleLabel,
|
|
43
45
|
},
|
|
44
46
|
);
|
|
45
47
|
|
|
48
|
+
/** @type {(bundle: SourceBundle, bundleLabel?: string) => Installation<unknown>} */
|
|
46
49
|
const makeBundleInstallation = prepareKind(
|
|
47
50
|
zoeBaggage,
|
|
48
51
|
'BundleInstallation',
|
|
49
52
|
(bundle, bundleLabel) => ({ bundle, bundleLabel }),
|
|
53
|
+
// @ts-expect-error cast without StartFunction property
|
|
50
54
|
{
|
|
51
55
|
getBundle: ({ state: { bundle } }) => bundle,
|
|
52
56
|
getBundleLabel: ({ state: { bundleLabel } }) => bundleLabel,
|
|
@@ -68,8 +72,6 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
|
|
|
68
72
|
typeof bundle === 'object' || Fail`a bundle must be provided`;
|
|
69
73
|
/** @type {Installation} */
|
|
70
74
|
bundle || Fail`a bundle must be provided`;
|
|
71
|
-
/** @type {Installation} */
|
|
72
|
-
// @ts-expect-error cast
|
|
73
75
|
const installation = makeBundleInstallation(bundle, bundleLabel);
|
|
74
76
|
installationsBundle.init(installation, bundle);
|
|
75
77
|
return installation;
|
|
@@ -81,8 +83,12 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
|
|
|
81
83
|
InstanceHandleShape,
|
|
82
84
|
M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
|
|
83
85
|
),
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
+
)
|
|
87
|
+
.optional(M.string())
|
|
88
|
+
.returns(M.promise()),
|
|
89
|
+
installBundleID: M.call(M.string())
|
|
90
|
+
.optional(M.string())
|
|
91
|
+
.returns(M.promise()),
|
|
86
92
|
unwrapInstallation: M.callWhen(M.await(InstallationShape)).returns(
|
|
87
93
|
UnwrappedInstallationShape,
|
|
88
94
|
),
|
|
@@ -125,8 +131,6 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
|
|
|
125
131
|
const bundleCap = await getBundleCapForID(bundleID);
|
|
126
132
|
// AWAIT
|
|
127
133
|
|
|
128
|
-
/** @type {Installation} */
|
|
129
|
-
// @ts-expect-error cast
|
|
130
134
|
const installation = makeBundleIDInstallation(bundleLabel);
|
|
131
135
|
installationsBundleCap.init(
|
|
132
136
|
installation,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeInstanceAdminStorage(baggage:
|
|
1
|
+
export function makeInstanceAdminStorage(baggage: import("@agoric/vat-data").Baggage): import("@endo/exo").GuardedKit<{
|
|
2
2
|
accessor: {
|
|
3
3
|
getPublicFacet(instance: any): any;
|
|
4
4
|
getBrands(instance: any): any;
|
|
@@ -9,25 +9,11 @@ export function makeInstanceAdminStorage(baggage: MapStore<string, unknown>): {
|
|
|
9
9
|
getInstanceAdmin(instance: any): any;
|
|
10
10
|
};
|
|
11
11
|
updater: {
|
|
12
|
-
initInstanceAdmin(instance: any, instanceAdmin: any): Promise<
|
|
13
|
-
deleteInstanceAdmin(instance: any):
|
|
14
|
-
};
|
|
15
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
16
|
-
accessor: {
|
|
17
|
-
getPublicFacet(instance: any): any;
|
|
18
|
-
getBrands(instance: any): any;
|
|
19
|
-
getIssuers(instance: any): any;
|
|
20
|
-
getTerms(instance: any): any;
|
|
21
|
-
getOfferFilter(instance: any): any;
|
|
22
|
-
getInstallation(instance: any): any;
|
|
23
|
-
getInstanceAdmin(instance: any): any;
|
|
24
|
-
};
|
|
25
|
-
updater: {
|
|
26
|
-
initInstanceAdmin(instance: any, instanceAdmin: any): Promise<any>;
|
|
27
|
-
deleteInstanceAdmin(instance: any): any;
|
|
12
|
+
initInstanceAdmin(instance: any, instanceAdmin: any): Promise<void>;
|
|
13
|
+
deleteInstanceAdmin(instance: any): void;
|
|
28
14
|
};
|
|
29
15
|
}>;
|
|
30
|
-
export function makeInstanceAdminMaker(zoeBaggage:
|
|
16
|
+
export function makeInstanceAdminMaker(zoeBaggage: import("@agoric/vat-data").Baggage, seatHandleToZoeSeatAdmin: WeakMapStore<SeatHandle, ZoeSeatAdmin>): (instanceHandle: any, zoeInstanceStorageManager: any, adminNode: any) => import("@agoric/swingset-liveslots").KindFacet<{
|
|
31
17
|
getPublicFacet: ({ state }: {
|
|
32
18
|
state: any;
|
|
33
19
|
}) => any;
|
|
@@ -66,39 +52,33 @@ export function makeInstanceAdminMaker(zoeBaggage: MapStore<string, unknown>, se
|
|
|
66
52
|
facets: {
|
|
67
53
|
helper: any;
|
|
68
54
|
};
|
|
69
|
-
}, invitationHandle: any, initialAllocation: any, proposal: any, offerArgs?: undefined) => {
|
|
70
|
-
getProposal(): Promise<
|
|
71
|
-
getPayouts(): Promise<
|
|
55
|
+
}, invitationHandle: any, initialAllocation: any, proposal: any, offerArgs?: undefined) => import("@endo/exo").Guarded<{
|
|
56
|
+
getProposal(): Promise<any>;
|
|
57
|
+
getPayouts(): Promise<any>;
|
|
72
58
|
getPayout(keyword: any): Promise<any>;
|
|
73
59
|
getOfferResult(): Promise<any>;
|
|
74
|
-
hasExited(): Promise<
|
|
75
|
-
tryExit(): Promise<
|
|
76
|
-
numWantsSatisfied(): Promise<
|
|
77
|
-
getExitSubscriber():
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
81
|
-
getFinalAllocation(): Promise<AmountKeywordRecord>;
|
|
82
|
-
};
|
|
60
|
+
hasExited(): Promise<any>;
|
|
61
|
+
tryExit(): Promise<any>;
|
|
62
|
+
numWantsSatisfied(): Promise<any>;
|
|
63
|
+
getExitSubscriber(): any;
|
|
64
|
+
getFinalAllocation(): any;
|
|
65
|
+
}>;
|
|
83
66
|
makeNoEscrowSeat: ({ state, facets: { helper } }: {
|
|
84
67
|
state: any;
|
|
85
68
|
facets: {
|
|
86
69
|
helper: any;
|
|
87
70
|
};
|
|
88
|
-
}, initialAllocation: any, proposal: any, exitObj: any, seatHandle: any) => {
|
|
89
|
-
getProposal(): Promise<
|
|
90
|
-
getPayouts(): Promise<
|
|
71
|
+
}, initialAllocation: any, proposal: any, exitObj: any, seatHandle: any) => import("@endo/exo").Guarded<{
|
|
72
|
+
getProposal(): Promise<any>;
|
|
73
|
+
getPayouts(): Promise<any>;
|
|
91
74
|
getPayout(keyword: any): Promise<any>;
|
|
92
75
|
getOfferResult(): Promise<any>;
|
|
93
|
-
hasExited(): Promise<
|
|
94
|
-
tryExit(): Promise<
|
|
95
|
-
numWantsSatisfied(): Promise<
|
|
96
|
-
getExitSubscriber():
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
};
|
|
100
|
-
getFinalAllocation(): Promise<AmountKeywordRecord>;
|
|
101
|
-
};
|
|
76
|
+
hasExited(): Promise<any>;
|
|
77
|
+
tryExit(): Promise<any>;
|
|
78
|
+
numWantsSatisfied(): Promise<any>;
|
|
79
|
+
getExitSubscriber(): any;
|
|
80
|
+
getFinalAllocation(): any;
|
|
81
|
+
}>;
|
|
102
82
|
getOfferFilter: ({ state }: {
|
|
103
83
|
state: any;
|
|
104
84
|
}) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAoDO,kDADK,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;GA2D7C;AA0JM,mDAHI,OAAO,kBAAkB,EAAE,OAAO,4BAClC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwChD;6BAvDY,QAAQ,CAAC;IACrB,WAAe,EAAE,OAAO,CAAC;IACzB,eAAmB,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACZ,kBAAsB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACZ,KAAS,EAAE,KAAK,CAAC;CACd"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
1
2
|
import {
|
|
2
3
|
canBeDurable,
|
|
3
4
|
makeScalarBigSetStore,
|
|
@@ -177,7 +178,7 @@ const makeInstanceAdminBehavior = (zoeBaggage, makeZoeSeatAdminKit) => {
|
|
|
177
178
|
|
|
178
179
|
state.zoeSeatAdmins.add(zoeSeatAdmin);
|
|
179
180
|
state.handleOfferObj || Fail`incomplete setup of zoe seat`;
|
|
180
|
-
E.when(
|
|
181
|
+
void E.when(
|
|
181
182
|
E(state.handleOfferObj).handleOffer(invitationHandle, seatData),
|
|
182
183
|
/** @param {HandleOfferResult} result */
|
|
183
184
|
result => zoeSeatAdmin.resolveExitAndResult(result),
|
|
@@ -32,13 +32,13 @@ type UnwrapInstallation = (installationP: ERef<Installation>) => ERef<{
|
|
|
32
32
|
}>;
|
|
33
33
|
type GetIssuerRecords = () => IssuerRecords;
|
|
34
34
|
type ZoeInstanceStorageManager = {
|
|
35
|
-
getTerms:
|
|
36
|
-
getIssuers:
|
|
37
|
-
getBrands:
|
|
38
|
-
saveIssuer:
|
|
35
|
+
getTerms: () => AnyTerms;
|
|
36
|
+
getIssuers: () => IssuerKeywordRecord;
|
|
37
|
+
getBrands: () => BrandKeywordRecord;
|
|
38
|
+
saveIssuer: ZCF["saveIssuer"];
|
|
39
39
|
makeZoeMint: MakeZoeMint;
|
|
40
40
|
registerFeeMint: RegisterFeeMint;
|
|
41
|
-
getInstanceRecord:
|
|
41
|
+
getInstanceRecord: () => InstanceRecord;
|
|
42
42
|
getIssuerRecords: GetIssuerRecords;
|
|
43
43
|
initInstanceAdmin: InitInstanceAdmin;
|
|
44
44
|
deleteInstanceAdmin: DeleteInstanceAdmin;
|
|
@@ -51,7 +51,7 @@ type ZoeInstanceStorageManager = {
|
|
|
51
51
|
/**
|
|
52
52
|
* of CreateVatResults
|
|
53
53
|
*/
|
|
54
|
-
getAdminNode: () => import(
|
|
54
|
+
getAdminNode: () => import("@agoric/swingset-vat").VatAdminFacet;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Create a storage manager for a particular contract instance. The
|
|
@@ -59,21 +59,21 @@ type ZoeInstanceStorageManager = {
|
|
|
59
59
|
* issuerStorage and escrowStorage from Zoe, and stores the
|
|
60
60
|
* instance-specific terms
|
|
61
61
|
*/
|
|
62
|
-
type MakeZoeInstanceStorageManager = (instanceBaggage:
|
|
62
|
+
type MakeZoeInstanceStorageManager = (instanceBaggage: import("@agoric/vat-data").Baggage, installation: Installation, customTerms: object, uncleanIssuerKeywordRecord: IssuerKeywordRecord, instance: Instance, contractBundleCap: BundleCap, instanceLabel: string) => Promise<ZoeInstanceStorageManager>;
|
|
63
63
|
type GetBundleCapForID = (id: BundleID) => Promise<BundleCap>;
|
|
64
64
|
type GetProposalShapeForInvitation = (invitationHandle: InvitationHandle) => Pattern | undefined;
|
|
65
65
|
type ZoeStorageManager = {
|
|
66
66
|
makeZoeInstanceStorageManager: MakeZoeInstanceStorageManager;
|
|
67
67
|
getAssetKindByBrand: GetAssetKindByBrand;
|
|
68
68
|
depositPayments: DepositPayments;
|
|
69
|
-
invitationIssuer: Issuer<
|
|
69
|
+
invitationIssuer: Issuer<"set">;
|
|
70
70
|
installBundle: InstallBundle;
|
|
71
71
|
installBundleID: InstallBundleID;
|
|
72
72
|
getBundleIDFromInstallation: GetBundleIDFromInstallation;
|
|
73
|
-
getPublicFacet: import(
|
|
73
|
+
getPublicFacet: import("./utils.js").GetPublicFacet;
|
|
74
74
|
getBrands: GetBrands;
|
|
75
75
|
getIssuers: GetIssuers;
|
|
76
|
-
getTerms: import(
|
|
76
|
+
getTerms: import("./utils.js").GetTerms;
|
|
77
77
|
getOfferFilter: GetOfferFilter;
|
|
78
78
|
setOfferFilter: SetOfferFilter;
|
|
79
79
|
getInstallationForInstance: GetInstallationForInstance;
|
|
@@ -85,6 +85,6 @@ type ZoeStorageManager = {
|
|
|
85
85
|
* Use VatAdminSvc to create a new vat, but only with the code of the
|
|
86
86
|
* ZCF bundle
|
|
87
87
|
*/
|
|
88
|
-
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import(
|
|
89
|
-
type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<
|
|
88
|
+
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import("@agoric/swingset-vat").CreateVatResults>;
|
|
89
|
+
type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<"nat">;
|
|
90
90
|
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAMW,MAAM,SACN,KAAK,KACH,
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAMW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACjB,MAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,YAAgB,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;uDAUrD,OAAO,kBAAkB,EAAE,OAAO,gBAClC,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;wDAKpB,gBAAgB,KACd,OAAO,GAAG,SAAS;;mCAKlB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;oBACd,cAAc;gCACd,0BAA0B;sBAC1B,gBAAgB;wBAChB,kBAAkB;mCAClB,6BAA6B;;;;;;wCAQhC,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC"}
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @typedef {object} ZoeInstanceStorageManager
|
|
79
|
-
* @property {
|
|
80
|
-
* @property {
|
|
81
|
-
* @property {
|
|
82
|
-
* @property {
|
|
79
|
+
* @property {() => AnyTerms} getTerms
|
|
80
|
+
* @property {() => IssuerKeywordRecord} getIssuers
|
|
81
|
+
* @property {() => BrandKeywordRecord} getBrands
|
|
82
|
+
* @property {ZCF['saveIssuer']} saveIssuer
|
|
83
83
|
* @property {MakeZoeMint} makeZoeMint
|
|
84
84
|
* @property {RegisterFeeMint} registerFeeMint
|
|
85
|
-
* @property {
|
|
85
|
+
* @property {() => InstanceRecord} getInstanceRecord
|
|
86
86
|
* @property {GetIssuerRecords} getIssuerRecords
|
|
87
87
|
* @property {InitInstanceAdmin} initInstanceAdmin
|
|
88
88
|
* @property {DeleteInstanceAdmin} deleteInstanceAdmin
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
* @property {import('./utils.js').GetPublicFacet} getPublicFacet
|
|
134
134
|
* @property {GetBrands} getBrands
|
|
135
135
|
* @property {GetIssuers} getIssuers
|
|
136
|
-
* @property {import('./utils').GetTerms} getTerms
|
|
136
|
+
* @property {import('./utils.js').GetTerms} getTerms
|
|
137
137
|
* @property {GetOfferFilter} getOfferFilter
|
|
138
138
|
* @property {SetOfferFilter} setOfferFilter
|
|
139
139
|
* @property {GetInstallationForInstance} getInstallationForInstance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitationQueries.d.ts","sourceRoot":"","sources":["invitationQueries.js"],"names":[],"mappings":"AAKO;;;;
|
|
1
|
+
{"version":3,"file":"invitationQueries.d.ts","sourceRoot":"","sources":["invitationQueries.js"],"names":[],"mappings":"AAKO;;;;EA+BN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
import { assert, details as X } from '@agoric/assert';
|
|
3
|
+
import { assert, details as X, Fail, quote as q } from '@agoric/assert';
|
|
4
4
|
import { E } from '@endo/eventual-send';
|
|
5
5
|
|
|
6
6
|
export const makeInvitationQueryFns = invitationIssuer => {
|
|
@@ -13,10 +13,12 @@ export const makeInvitationQueryFns = invitationIssuer => {
|
|
|
13
13
|
assert.note(err, X`Due to ${reason}`);
|
|
14
14
|
throw err;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
)
|
|
16
|
+
const invAmount = await E(invitationIssuer)
|
|
17
|
+
.getAmountOf(invitationP)
|
|
18
|
+
.catch(onRejected);
|
|
19
|
+
(Array.isArray(invAmount.value) && invAmount.value.length === 1) ||
|
|
20
|
+
Fail`Expected exactly 1 invitation, not ${q(invAmount.value.length)}`;
|
|
21
|
+
return invAmount.value[0];
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
/** @type {GetInstance} */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function prepareInvitationKit(baggage:
|
|
2
|
-
invitationIssuer: Issuer<"set">;
|
|
3
|
-
invitationKit: IssuerKit<"set">;
|
|
1
|
+
export function prepareInvitationKit(baggage: import("@agoric/vat-data").Baggage, shutdownZoeVat?: import("@agoric/swingset-vat").ShutdownWithFailure | undefined): {
|
|
2
|
+
invitationIssuer: globalThis.Issuer<"set", InvitationDetails>;
|
|
3
|
+
invitationKit: globalThis.IssuerKit<"set", InvitationDetails>;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=makeInvitation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAgBO,
|
|
1
|
+
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAgBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;EAgCxE"}
|