@agoric/zoe 0.26.3-dev-727e4af.0 → 0.26.3-dev-96c9ff5.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/bundles/bundle-contractFacet-js-meta.json +258 -253
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +27 -27
- package/src/cleanProposal.d.ts +1 -1
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +8 -0
- 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/types-ambient.d.ts +10 -5
- package/src/contractFacet/vatRoot.d.ts +1 -1
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.d.ts +1 -1
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +2 -3
- package/src/contractFacet/zcfSeat.js +1 -1
- package/src/contractSupport/durability.d.ts +1 -1
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +1 -1
- package/src/contractSupport/priceAuthority.d.ts +2 -1
- package/src/contractSupport/priceAuthority.d.ts.map +1 -1
- package/src/contractSupport/priceAuthority.js +1 -1
- package/src/contractSupport/priceAuthorityInitial.d.ts +2 -1
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.js +8 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts +3 -2
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.js +5 -5
- package/src/contractSupport/priceQuote.d.ts +3 -3
- package/src/contractSupport/priceQuote.d.ts.map +1 -1
- package/src/contractSupport/ratio.d.ts.map +1 -1
- package/src/contractSupport/ratio.js +18 -13
- package/src/contractSupport/recorder.d.ts +13 -13
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/recorder.js +3 -3
- package/src/contractSupport/zoeHelpers.d.ts +1 -1
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contracts/auction/index.d.ts +2 -2
- package/src/contracts/automaticRefund.d.ts +1 -1
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +4 -2
- package/src/contracts/barterExchange.d.ts +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
- package/src/contracts/callSpread/pricedCallSpread.js +1 -0
- package/src/contracts/loan/borrow.d.ts.map +1 -1
- package/src/contracts/loan/borrow.js +3 -1
- package/src/contracts/mintPayments.d.ts +6 -6
- package/src/contracts/oracle.d.ts +2 -2
- package/src/contracts/otcDesk.d.ts +1 -1
- package/src/contracts/priceAggregator.d.ts +5 -4
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +2 -5
- package/src/contracts/simpleExchange.d.ts +1 -1
- package/src/internal-types.d.ts +5 -4
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +7 -4
- package/src/typeGuards.d.ts +1 -1
- package/src/types-ambient.d.ts +5 -8
- package/src/types-ambient.d.ts.map +1 -1
- package/src/types-ambient.js +3 -5
- package/src/zoeService/escrowStorage.js +1 -1
- package/src/zoeService/feeMint.d.ts +1 -1
- package/src/zoeService/makeInvitation.d.ts +2 -2
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +3 -0
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +4 -3
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +6 -1
- package/src/zoeService/types-ambient.d.ts +2 -2
- package/src/zoeService/types-ambient.d.ts.map +1 -1
- package/src/zoeService/types-ambient.js +2 -2
- package/src/zoeService/utils.d.ts +17 -17
- package/src/zoeService/zoe.d.ts +2 -2
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +3 -2
- package/src/zoeService/zoeStorageManager.d.ts +3 -3
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +3 -1
- package/tools/fakePriceAuthority.d.ts +3 -3
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +12 -9
- package/tools/fakeVatAdmin.d.ts +6 -6
- package/tools/manualTimer.d.ts +5 -5
- package/tools/manualTimer.d.ts.map +1 -1
- package/tools/manualTimer.js +6 -4
- package/tools/scriptedOracle.d.ts +1 -1
- package/tools/setup-zoe.d.ts +1 -1
- package/tools/types.d.ts +4 -4
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,yCAHI,OAAO,kBAAkB,EAAE,OAAO,cAClC,IAAI,CAAC,UAAU,CAAC;;IAmCrB;;;;OAIG;sBADU,OAAO,CAAC,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,yCAHI,OAAO,kBAAkB,EAAE,OAAO,cAClC,IAAI,CAAC,UAAU,CAAC;;IAmCrB;;;;OAIG;sBADU,OAAO,CAAC,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,GAAG,GACD,OAAO,CAAC,IAAI,CAAC;IAa1B;;;;;OAKG;sBAFQ,GAAG,GACD,OAAO,CAAC,IAAI,CAAC;GAkB/B;AAWM,2EAFI;IAAC,YAAY,EAAE,YAAY,CAAC;IA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epareRecorder = (baggage, marshaller) => {
|
|
|
94
94
|
/**
|
|
95
95
|
* Marshalls before writing to storage or publisher to help ensure the two streams match.
|
|
96
96
|
*
|
|
97
|
-
* @param {
|
|
97
|
+
* @param {any} value
|
|
98
98
|
* @returns {Promise<void>}
|
|
99
99
|
*/
|
|
100
100
|
async write(value) {
|
|
@@ -111,7 +111,7 @@ export const prepareRecorder = (baggage, marshaller) => {
|
|
|
111
111
|
/**
|
|
112
112
|
* Like `write` but prevents future writes and terminates the publisher.
|
|
113
113
|
*
|
|
114
|
-
* @param {
|
|
114
|
+
* @param {any} value
|
|
115
115
|
* @returns {Promise<void>}
|
|
116
116
|
*/
|
|
117
117
|
async writeFinal(value) {
|
|
@@ -267,7 +267,7 @@ export const prepareMockRecorderKitMakers = () => {
|
|
|
267
267
|
* whole thing to `any`.
|
|
268
268
|
*
|
|
269
269
|
* @template T
|
|
270
|
-
* @typedef {{ validatedType?: T }} TypedMatcher
|
|
270
|
+
* @typedef {import('@endo/patterns').Matcher & { validatedType?: T }} TypedMatcher
|
|
271
271
|
*/
|
|
272
272
|
|
|
273
273
|
/**
|
|
@@ -11,7 +11,7 @@ export function assertNatAssetKind(zcf: any, brand: any): void;
|
|
|
11
11
|
export const depositToSeatSuccessMsg: "Deposit and reallocation successful.";
|
|
12
12
|
export function depositToSeat(zcf: ZCF, recipientSeat: ZCFSeat, amounts: AmountKeywordRecord, payments: PaymentPKeywordRecord): Promise<string>;
|
|
13
13
|
export function withdrawFromSeat(zcf: ZCF, seat: ZCFSeat, amounts: AmountKeywordRecord): Promise<PaymentPKeywordRecord>;
|
|
14
|
-
export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(IssuerRecord<any> | undefined)[]>;
|
|
14
|
+
export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(IssuerRecord<any, import("@endo/patterns").Key> | undefined)[]>;
|
|
15
15
|
/** @type {MapKeywords} */
|
|
16
16
|
export const mapKeywords: MapKeywords;
|
|
17
17
|
export function offerTo<Args extends unknown, Result extends unknown>(zcf: ZCF, invitation: ERef<Invitation<Result, Args>>, keywordMapping: KeywordKeywordRecord | undefined, proposal: Proposal, fromSeat: ZCFSeat, toSeat?: ZCFSeat | undefined, offerArgs?: Args | undefined): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA,iIAAkI;AAM3H,oEAON;AAuBM,+BALI,GAAG,QACH,cAAc,UACd,mBAAmB,GACjB,CAAC,GAAC,CAAC,CAOf;AAED,mBAAmB;AACnB,mBADW,IAAI,CAkBb;AAEF,wBAAwB;AACxB,wBADW,SAAS,CAqBlB;AAiBK,uCAHI,OAAO,iBACP,OAAO,QAIgD;AAsB3D,0CAHI,OAAO,YACP,cAAc,QA+BxB;AAGM,+DAGN;AAED,6EAA8E;AAavE,mCANI,GAAG,iBACH,OAAO,WACP,mBAAmB,YACnB,qBAAqB,GACnB,OAAO,CAAC,MAAM,CAAC,CA8B3B;AAYM,sCALI,GAAG,QACH,OAAO,WACP,mBAAmB,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAQ1C;AAWM,oCAJI,GAAG,wBACH,mBAAmB,
|
|
1
|
+
{"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA,iIAAkI;AAM3H,oEAON;AAuBM,+BALI,GAAG,QACH,cAAc,UACd,mBAAmB,GACjB,CAAC,GAAC,CAAC,CAOf;AAED,mBAAmB;AACnB,mBADW,IAAI,CAkBb;AAEF,wBAAwB;AACxB,wBADW,SAAS,CAqBlB;AAiBK,uCAHI,OAAO,iBACP,OAAO,QAIgD;AAsB3D,0CAHI,OAAO,YACP,cAAc,QA+BxB;AAGM,+DAGN;AAED,6EAA8E;AAavE,mCANI,GAAG,iBACH,OAAO,WACP,mBAAmB,YACnB,qBAAqB,GACnB,OAAO,CAAC,MAAM,CAAC,CA8B3B;AAYM,sCALI,GAAG,QACH,OAAO,WACP,mBAAmB,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAQ1C;AAWM,oCAJI,GAAG,wBACH,mBAAmB,4EAgB7B;AAED,0BAA0B;AAC1B,0BADW,WAAW,CAYpB;AAiDK,wBA9B4B,IAAI,kBAqBiB,MAAM,uBAxBnD,GAAG,cAGH,IAAI,CAAC,UAAU,CAqB8B,MAAM,AArB7B,EAAE,IAAI,CAAC,CAAC,kBAG9B,oBAAoB,GAAG,SAAS,YAKhC,QAAQ,YAGR,OAAO,+DAUL,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAzVa,MAAM,cAAc;0BACpB,MAAM,UAAU"}
|
|
@@ -37,7 +37,7 @@ export function start(zcf: ZCF<{
|
|
|
37
37
|
timeAuthority: import("@agoric/time").TimerService;
|
|
38
38
|
bids: string | any[];
|
|
39
39
|
};
|
|
40
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
40
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
41
41
|
makeBidInvitation: () => Promise<Invitation<unknown, never>>;
|
|
42
42
|
getSessionDetails: () => {
|
|
43
43
|
auctionedAssets: any;
|
|
@@ -60,7 +60,7 @@ export function start(zcf: ZCF<{
|
|
|
60
60
|
timeAuthority: import("@agoric/time").TimerService;
|
|
61
61
|
bids: string | any[];
|
|
62
62
|
};
|
|
63
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
63
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
64
64
|
getCurrentBids: () => any[] | "Bids are hidden for \"second price\" auctions";
|
|
65
65
|
getSessionDetails: () => {
|
|
66
66
|
auctionedAssets: any;
|
|
@@ -17,7 +17,7 @@ export function start(zcf: ZCF<{}>): {
|
|
|
17
17
|
publicFacet: {
|
|
18
18
|
getOffersCount: () => bigint;
|
|
19
19
|
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
20
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
20
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
21
21
|
getOffersCount: () => bigint;
|
|
22
22
|
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
23
23
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;
|
|
1
|
+
{"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAsVb"}
|
|
@@ -274,8 +274,10 @@ const start = async zcf => {
|
|
|
274
274
|
});
|
|
275
275
|
|
|
276
276
|
// TODO (hibbert) should we burn tokens?
|
|
277
|
-
|
|
278
|
-
/** @type {Amount<'nat'>} */
|
|
277
|
+
|
|
278
|
+
const userAllocation = /** @type {{Liquidity: Amount<'nat'>}} */ (
|
|
279
|
+
removeLiqSeat.getCurrentAllocation()
|
|
280
|
+
);
|
|
279
281
|
const liquidityIn = userAllocation.Liquidity;
|
|
280
282
|
assert(!AmountMath.isEmpty(liquidityIn), 'Pool is empty');
|
|
281
283
|
const liquidityValueIn = liquidityIn.value;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export function start(zcf: ZCF): {
|
|
16
16
|
publicFacet: {
|
|
17
17
|
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
18
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
18
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
19
19
|
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
20
20
|
}>;
|
|
21
21
|
};
|
|
@@ -56,7 +56,7 @@ export function start(zcf: ZCF<{
|
|
|
56
56
|
longInvitation: Promise<Invitation<unknown, never>>;
|
|
57
57
|
shortInvitation: Promise<Invitation<unknown, never>>;
|
|
58
58
|
};
|
|
59
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
59
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
60
60
|
makeInvitationPair: (longCollateralShare: any) => {
|
|
61
61
|
longInvitation: Promise<Invitation<unknown, never>>;
|
|
62
62
|
shortInvitation: Promise<Invitation<unknown, never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,MAAM,CAAC,KAAK,CAAC;kBACb,MAAM,CAAC,KAAK,CAAC;sBACT,MAAM,CAAC,KAAK,CAAC;;gBAEnB,MAAM;sBACA,MAAM,CAAC,KAAK,CAAC;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,MAAM,CAAC,KAAK,CAAC;kBACb,MAAM,CAAC,KAAK,CAAC;sBACT,MAAM,CAAC,KAAK,CAAC;;gBAEnB,MAAM;sBACA,MAAM,CAAC,KAAK,CAAC;;;;;;;;;;;;;EA2GjC;oCA7J4F,4BAA4B"}
|
|
@@ -104,6 +104,7 @@ const start = zcf => {
|
|
|
104
104
|
const invitationIssuer = zcf.getInvitationIssuer();
|
|
105
105
|
const payment = harden({ Option: option });
|
|
106
106
|
const Option = await E(invitationIssuer).getAmountOf(option);
|
|
107
|
+
/** @type {any} */
|
|
107
108
|
const spreadAmount = harden({
|
|
108
109
|
Option,
|
|
109
110
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAkBA,mCAAmC;AACnC,mCADW,oBAAoB,
|
|
1
|
+
{"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAkBA,mCAAmC;AACnC,mCADW,oBAAoB,CAsI7B"}
|
|
@@ -39,7 +39,9 @@ export const makeBorrowInvitation = (zcf, config) => {
|
|
|
39
39
|
|
|
40
40
|
const collateralGiven = borrowerSeat.getAmountAllocated(
|
|
41
41
|
'Collateral',
|
|
42
|
-
|
|
42
|
+
/** @type {Brand<'nat'>} */ (
|
|
43
|
+
borrowerSeat.getProposal().give.Collateral.brand
|
|
44
|
+
),
|
|
43
45
|
);
|
|
44
46
|
const loanWanted = borrowerSeat.getProposal().want.Loan;
|
|
45
47
|
const loanBrand = zcf.getTerms().brands.Loan;
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
export function start(zcf: ZCF): Promise<{
|
|
17
17
|
creatorFacet: {
|
|
18
18
|
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
19
|
-
getTokenIssuer: () => globalThis.Issuer<"nat">;
|
|
20
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
19
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
20
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
21
21
|
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
22
|
-
getTokenIssuer: () => globalThis.Issuer<"nat">;
|
|
22
|
+
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
23
23
|
}>;
|
|
24
24
|
publicFacet: {
|
|
25
|
-
getTokenIssuer: () => globalThis.Issuer<"nat">;
|
|
26
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
27
|
-
getTokenIssuer: () => globalThis.Issuer<"nat">;
|
|
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
28
|
}>;
|
|
29
29
|
}>;
|
|
30
30
|
//# sourceMappingURL=mintPayments.d.ts.map
|
|
@@ -8,7 +8,7 @@ export type OracleStart = typeof start;
|
|
|
8
8
|
export function start(zcf: ZCF): Promise<{
|
|
9
9
|
creatorFacet: {
|
|
10
10
|
initialize(privateParams: any): OracleCreatorFacet;
|
|
11
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
11
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
12
12
|
initialize(privateParams: any): OracleCreatorFacet;
|
|
13
13
|
}>;
|
|
14
14
|
publicFacet: {
|
|
@@ -16,7 +16,7 @@ export function start(zcf: ZCF): Promise<{
|
|
|
16
16
|
query(query: OracleQuery): Promise<unknown>;
|
|
17
17
|
/** @param {OracleQuery} query */
|
|
18
18
|
makeQueryInvitation(query: OracleQuery): Promise<Invitation<unknown, never>>;
|
|
19
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
19
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
20
20
|
/** @param {OracleQuery} query */
|
|
21
21
|
query(query: OracleQuery): Promise<unknown>;
|
|
22
22
|
/** @param {OracleQuery} query */
|
|
@@ -56,7 +56,7 @@ export function start(zcf: ZCF<Record<string, any>>): {
|
|
|
56
56
|
*/
|
|
57
57
|
makeRemoveInventoryInvitation: () => Promise<Payment>;
|
|
58
58
|
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority: import("@agoric/time").TimerService, deadline: any) => Promise<Payment>;
|
|
59
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
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.
|
|
@@ -20,7 +20,7 @@ export type PriceAggregatorContract = ContractOf<typeof start>;
|
|
|
20
20
|
* }>} zcf
|
|
21
21
|
* @param {{
|
|
22
22
|
* marshaller: Marshaller,
|
|
23
|
-
* quoteMint?: ERef<Mint<'set'>>,
|
|
23
|
+
* quoteMint?: ERef<Mint<'set', PriceDescription>>,
|
|
24
24
|
* storageNode: ERef<StorageNode>,
|
|
25
25
|
* }} privateArgs
|
|
26
26
|
*/
|
|
@@ -32,7 +32,7 @@ export function start(zcf: ZCF<{
|
|
|
32
32
|
unitAmountIn: Amount<"nat">;
|
|
33
33
|
}>, privateArgs: {
|
|
34
34
|
marshaller: Marshaller;
|
|
35
|
-
quoteMint?: ERef<Mint<"set"
|
|
35
|
+
quoteMint?: globalThis.ERef<globalThis.Mint<"set", PriceDescription>> | undefined;
|
|
36
36
|
storageNode: ERef<StorageNode>;
|
|
37
37
|
}): Promise<{
|
|
38
38
|
creatorFacet: {
|
|
@@ -63,7 +63,7 @@ export function start(zcf: ZCF<{
|
|
|
63
63
|
* @returns {Promise<OracleAdmin<Price>>}
|
|
64
64
|
*/
|
|
65
65
|
initOracle: (oracleInstance?: string | Instance | undefined, query?: OracleQuery | undefined) => Promise<OracleAdmin<Price>>;
|
|
66
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
66
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
67
67
|
/**
|
|
68
68
|
* An "oracle invitation" is an invitation to be able to submit data to
|
|
69
69
|
* include in the priceAggregator's results.
|
|
@@ -97,11 +97,12 @@ export function start(zcf: ZCF<{
|
|
|
97
97
|
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
98
98
|
/** Diagnostic tool */
|
|
99
99
|
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
100
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
100
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
101
101
|
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
102
102
|
getSubscriber: () => globalThis.StoredSubscriber<unknown>;
|
|
103
103
|
/** Diagnostic tool */
|
|
104
104
|
getRoundCompleteNotifier(): Promise<globalThis.Notifier<any>>;
|
|
105
105
|
}>;
|
|
106
106
|
}>;
|
|
107
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
107
108
|
//# sourceMappingURL=priceAggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAoCc,MAAM,GAAG,MAAM,GAAG,MAAM;oCAEzB,QAAQ,CAAC,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;oBAGlD,cAAc,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAoCc,MAAM,GAAG,MAAM,GAAG,MAAM;oC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
63
|
-
* quoteMint?: ERef<Mint<'set'>>,
|
|
63
|
+
* quoteMint?: ERef<Mint<'set', PriceDescription>>,
|
|
64
64
|
* storageNode: ERef<StorageNode>,
|
|
65
65
|
* }} privateArgs
|
|
66
66
|
*/
|
|
@@ -78,12 +78,11 @@ const start = async (zcf, privateArgs) => {
|
|
|
78
78
|
const { marshaller, storageNode } = privateArgs;
|
|
79
79
|
assertAllDefined({ marshaller, storageNode });
|
|
80
80
|
|
|
81
|
+
/** @type {ERef<Mint<'set', PriceDescription>>} */
|
|
81
82
|
const quoteMint =
|
|
82
83
|
privateArgs.quoteMint ||
|
|
83
84
|
// makeIssuerKit fails upgrade, this contract is for demo only
|
|
84
85
|
makeIssuerKit('quote', AssetKind.SET).mint;
|
|
85
|
-
/** @type {IssuerRecord<'set'>} */
|
|
86
|
-
// xxx saveIssuer not generic
|
|
87
86
|
const quoteIssuerRecord = await zcf.saveIssuer(
|
|
88
87
|
E(quoteMint).getIssuer(),
|
|
89
88
|
'Quote',
|
|
@@ -101,8 +100,6 @@ const start = async (zcf, privateArgs) => {
|
|
|
101
100
|
* @param {PriceQuoteValue} quote
|
|
102
101
|
*/
|
|
103
102
|
const authenticateQuote = async quote => {
|
|
104
|
-
/** @type {Amount<'set'>} */
|
|
105
|
-
// xxx type should be inferred from brand and value
|
|
106
103
|
const quoteAmount = AmountMath.make(quoteKit.brand, harden(quote));
|
|
107
104
|
const quotePayment = await E(quoteKit.mint).mintPayment(quoteAmount);
|
|
108
105
|
return harden({ quoteAmount, quotePayment });
|
|
@@ -26,7 +26,7 @@ export function start(zcf: ZCF): {
|
|
|
26
26
|
buys: any;
|
|
27
27
|
sells: any;
|
|
28
28
|
}>;
|
|
29
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
29
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
30
30
|
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
31
31
|
getNotifier: () => globalThis.Notifier<{
|
|
32
32
|
buys: any;
|
package/src/internal-types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ type ZoeSeatAdminKit = {
|
|
|
24
24
|
*/
|
|
25
25
|
type MakeZoeSeatAdminKit = (initialAllocation: Allocation, instanceAdminHelper: InstanceAdminHelper, proposal: ProposalRecord, withdrawFacet: WithdrawFacet, exitObj: ERef<ExitObj>, offerResult?: ERef<unknown>, baggage: import("@agoric/vat-data").Baggage) => ZoeSeatAdminKit;
|
|
26
26
|
type ZoeSeatAdminExit = (completion?: Completion) => void;
|
|
27
|
-
type
|
|
27
|
+
type ZoeSeatAdminMethods = {
|
|
28
28
|
replaceAllocation: (allocation: Allocation) => void;
|
|
29
29
|
exit: ZoeSeatAdminExit;
|
|
30
30
|
/**
|
|
@@ -34,8 +34,9 @@ type ZoeSeatAdmin = {
|
|
|
34
34
|
fail: import("@agoric/swingset-vat").ShutdownWithFailure;
|
|
35
35
|
getExitSubscriber: () => Subscriber<AmountKeywordRecord>;
|
|
36
36
|
};
|
|
37
|
+
type ZoeSeatAdmin = import("@endo/marshal").RemotableObject & ZoeSeatAdminMethods;
|
|
37
38
|
type HandleOfferResult = {
|
|
38
|
-
offerResultPromise: Promise<
|
|
39
|
+
offerResultPromise: Promise<import("@endo/marshal").Passable>;
|
|
39
40
|
exitObj: ExitObj;
|
|
40
41
|
};
|
|
41
42
|
/**
|
|
@@ -72,7 +73,7 @@ type HandleOfferObj = {
|
|
|
72
73
|
type ZoeInstanceAdminMakeInvitation = (invitationHandle: InvitationHandle, description: string, customDetails?: Record<string, any> | undefined, proposalShape?: Pattern) => Invitation;
|
|
73
74
|
type ZoeInstanceAdmin = {
|
|
74
75
|
makeInvitation: ZoeInstanceAdminMakeInvitation;
|
|
75
|
-
saveIssuer: (issuerP: ERef<
|
|
76
|
+
saveIssuer: <I extends Issuer>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M> ? IssuerRecord<K, M> : never>;
|
|
76
77
|
makeZoeMint: MakeZoeMint;
|
|
77
78
|
registerFeeMint: RegisterFeeMint;
|
|
78
79
|
makeNoEscrowSeat: MakeNoEscrowSeat;
|
|
@@ -90,7 +91,7 @@ type ZoeInstanceAdmin = {
|
|
|
90
91
|
type RegisterFeeMint = (keyword: Keyword, allegedFeeMintAccess: FeeMintAccess) => ZoeMint<"nat">;
|
|
91
92
|
type WrapIssuerKitWithZoeMint = (keyword: Keyword, localIssuerKit: IssuerKit) => any;
|
|
92
93
|
type MakeZoeMint = (keyword: Keyword, assetKind?: globalThis.AssetKind | undefined, displayInfo?: globalThis.AdditionalDisplayInfo | undefined, options?: Partial<{
|
|
93
|
-
elementShape:
|
|
94
|
+
elementShape: globalThis.Pattern;
|
|
94
95
|
recoverySetsOption: import("@agoric/ertp/exported.js").RecoverySetsOption;
|
|
95
96
|
}> | undefined) => ZoeMint;
|
|
96
97
|
type MakeNoEscrowSeat = (initialAllocation: Allocation, proposal: ProposalRecord, exitObj: ExitObj, seatHandle: SeatHandle) => UserSeat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";cAIc,cAAc;uBACd,UAAU;gBACV,UAAU;gBACV,MAAM;;;;;qCAOT,UAAU,KACR,qBAAqB;;sBAKpB,CAAC,UAAU,EAAC,UAAU,KAAK,qBAAqB;;;sBAKhD,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI;eACpC,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO;;;cAKvC,QAAQ;kBACR,YAAY;;;;;+CAMf,UAAU,uBACV,mBAAmB,YACnB,cAAc,iBACd,aAAa,WACb,IAAI,CAAC,OAAO,CAAC,gBACb,IAAI,CAAC,OAAO,CAAC,WACb,OAAO,kBAAkB,EAAE,OAAO,KAChC,eAAe;sCAKjB,UAAU,KACR,IAAI;;uBAKH,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI;UAChC,gBAAgB;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,EAAE;;gBAKnB,UAAU;gBACV,UAAU;;aAQW,CAAC;qBAFtB,MAAM,YAAY,CAEG,CAAC,AAFF,CAAC;mBACrB,CAAC,WAAW,EAAE,MAAM,CACC,CAAC,AADA,CAAC,KAAK,IAAI;;;;;;;qBAChC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI;;;cAShC,QAAQ;qBACR,eAAe;;;kBAKf,MAAM;;iBAEN,MAAM;oBACN,cAAc;;mCAKjB,IAAI,CAAC,gBAAgB,CAAC,yBACtB,cAAc,wBACd,aAAa,gBACb,MAAM,KACJ,OAAO,CAAC,qBAAqB,CAAC;sCAKhC,MAAM,KACJ,OAAO,kCAAkC;8BAK3C,cAAc,gBACd,OAAO,KACL,OAAO;;UAKN,MAAM,IAAI;;kBAIX,MAAM,CAAC,MAAM,CAAC;;;;;;mCAShB,KAAK,KACH,SAAS;qBAIT,KAAK,CAAC,YAAY,CAAC;8BAKrB,QAAQ,KACN,OAAO;;;;;+BAQP,IAAI;;iBAKH,WAAW;gBACX,UAAU;uBACV,iBAAiB;;;gBAKjB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,KAAK,IAAI;;;;;;wCASxD,OAAO,gBACP,YAAY,KACV,IAAI;;eAKH,sBAAsB;uBACtB,MAAM,cAAc;cACpB,MAAM,QAAQ;qBACd,MAAM,YAAY;gBAClB,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;yBACxB,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI"}
|
package/src/internal-types.js
CHANGED
|
@@ -53,13 +53,16 @@
|
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* @typedef
|
|
56
|
+
* @typedef ZoeSeatAdminMethods
|
|
57
57
|
* @property {(allocation: Allocation) => void} replaceAllocation
|
|
58
58
|
* @property {ZoeSeatAdminExit} exit
|
|
59
59
|
* @property {import('@agoric/swingset-vat').ShutdownWithFailure} fail called with the reason
|
|
60
60
|
* for calling fail on this seat, where reason is normally an instanceof Error.
|
|
61
61
|
* @property {() => Subscriber<AmountKeywordRecord>} getExitSubscriber
|
|
62
62
|
*/
|
|
63
|
+
/**
|
|
64
|
+
* @typedef {import('@endo/marshal').RemotableObject & ZoeSeatAdminMethods} ZoeSeatAdmin
|
|
65
|
+
*/
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
68
|
* @callback {(brand: Brand) => AssetKind} GetAssetKind
|
|
@@ -67,7 +70,7 @@
|
|
|
67
70
|
|
|
68
71
|
/**
|
|
69
72
|
* @typedef {object} HandleOfferResult
|
|
70
|
-
* @property {Promise<
|
|
73
|
+
* @property {Promise<import('@endo/marshal').Passable>} offerResultPromise
|
|
71
74
|
* @property {ExitObj} exitObj
|
|
72
75
|
*/
|
|
73
76
|
|
|
@@ -122,9 +125,9 @@
|
|
|
122
125
|
/**
|
|
123
126
|
* @typedef {object} ZoeInstanceAdmin
|
|
124
127
|
* @property {ZoeInstanceAdminMakeInvitation} makeInvitation
|
|
125
|
-
* @property {(issuerP: ERef<
|
|
128
|
+
* @property {<I extends Issuer>(issuerP: ERef<I>,
|
|
126
129
|
* keyword: Keyword
|
|
127
|
-
* ) => Promise<IssuerRecord>} saveIssuer
|
|
130
|
+
* ) => Promise<I extends Issuer<infer K, infer M> ? IssuerRecord<K, M> : never>} saveIssuer
|
|
128
131
|
* @property {MakeZoeMint} makeZoeMint
|
|
129
132
|
* @property {RegisterFeeMint} registerFeeMint
|
|
130
133
|
* @property {MakeNoEscrowSeat} makeNoEscrowSeat
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -163,7 +163,7 @@ export const HandleOfferI: import("@endo/patterns").InterfaceGuard<{
|
|
|
163
163
|
}>;
|
|
164
164
|
export namespace PriceQuoteShape {
|
|
165
165
|
export { AmountShape as quoteAmount };
|
|
166
|
-
export let quotePayment:
|
|
166
|
+
export let quotePayment: globalThis.Pattern;
|
|
167
167
|
}
|
|
168
168
|
import { AmountShape } from '@agoric/ertp';
|
|
169
169
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/types-ambient.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* identified by the H string. This uses an intersection type
|
|
4
|
-
* ('MyHandle' & {}) to tag the handle's type even though the actual
|
|
5
|
-
* value is just an empty object.
|
|
2
|
+
* Alias for RemotableObject
|
|
6
3
|
*/
|
|
7
|
-
type Handle<H extends string> =
|
|
4
|
+
type Handle<H extends string> = import("@endo/marshal").RemotableObject<H>;
|
|
8
5
|
type Keyword = string;
|
|
9
6
|
/**
|
|
10
7
|
* - an opaque handle for an invitation
|
|
@@ -34,11 +31,11 @@ type InstanceRecord = {
|
|
|
34
31
|
*/
|
|
35
32
|
terms: AnyTerms;
|
|
36
33
|
};
|
|
37
|
-
type IssuerRecord<K extends globalThis.AssetKind = globalThis.AssetKind> = {
|
|
34
|
+
type IssuerRecord<K extends globalThis.AssetKind = globalThis.AssetKind, M extends import("@endo/patterns").Key = import("@endo/patterns").Key> = {
|
|
38
35
|
brand: Brand<K>;
|
|
39
|
-
issuer: Issuer<K>;
|
|
36
|
+
issuer: Issuer<K, M>;
|
|
40
37
|
assetKind: K;
|
|
41
38
|
displayInfo?: globalThis.DisplayInfo<K> | undefined;
|
|
42
39
|
};
|
|
43
|
-
type Allocation<K extends globalThis.AssetKind = globalThis.AssetKind> = AmountKeywordRecord;
|
|
40
|
+
type Allocation<K extends globalThis.AssetKind = globalThis.AssetKind, M extends import("@endo/patterns").Key = import("@endo/patterns").Key> = AmountKeywordRecord;
|
|
44
41
|
//# sourceMappingURL=types-ambient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;YAMqD,CAAC,mBAAzC,OAAO,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;eAI1C,MAAM;;;;wBACN,MAAM,CAAC,YAAY,CAAC;2BACpB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;4BAC5B,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;0BAClC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;;;;;;aAK1B,mBAAmB;;;;;YAEnB,kBAAkB;;gBAGnB,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;kBAGlC,YAAY;cACZ,OAAO,uBAAuB,EAAE,QAAQ,CAAC,GAAG,CAAC;;;;WAC7C,QAAQ;;kBASR,CAAC,sDADS,CAAC;WADX,KAAK,CAEL,CAAC,AAFM,CAAC;YACR,MAAM,CACN,CAAC,AADO,EAAE,CAAC,CAAC;eACZ,CAAC;;;gJAGF,mBAAmB"}
|
package/src/types-ambient.js
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @template {string} H - the name of the handle
|
|
7
|
-
* @typedef {
|
|
8
|
-
* identified by the H string. This uses an intersection type
|
|
9
|
-
* ('MyHandle' & {}) to tag the handle's type even though the actual
|
|
10
|
-
* value is just an empty object.
|
|
7
|
+
* @typedef {import("@endo/marshal").RemotableObject<H>} Handle Alias for RemotableObject
|
|
11
8
|
*/
|
|
12
9
|
|
|
13
10
|
/**
|
|
@@ -35,9 +32,10 @@
|
|
|
35
32
|
|
|
36
33
|
/**
|
|
37
34
|
* @template {AssetKind} [K=AssetKind]
|
|
35
|
+
* @template {import("@endo/patterns").Key} [M=import("@endo/patterns").Key] member kind, for Amounts that have member values
|
|
38
36
|
* @typedef {object} IssuerRecord
|
|
39
37
|
* @property {Brand<K>} brand
|
|
40
|
-
* @property {Issuer<K>} issuer
|
|
38
|
+
* @property {Issuer<K, M>} issuer
|
|
41
39
|
* @property {K} assetKind
|
|
42
40
|
* @property {DisplayInfo<K>} [displayInfo]
|
|
43
41
|
*
|
|
@@ -16,7 +16,7 @@ import { cleanKeywords } from '../cleanProposal.js';
|
|
|
16
16
|
* @param {import('@agoric/vat-data').Baggage} baggage
|
|
17
17
|
*/
|
|
18
18
|
export const provideEscrowStorage = baggage => {
|
|
19
|
-
/** @type {WeakMapStore<Brand,
|
|
19
|
+
/** @type {WeakMapStore<Brand, Purse>} */
|
|
20
20
|
const brandToPurse = provideDurableWeakMapStore(baggage, 'brandToPurse');
|
|
21
21
|
|
|
22
22
|
/** @type {CreatePurse} */
|
|
@@ -15,7 +15,7 @@ export namespace defaultFeeIssuerConfig {
|
|
|
15
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
17
|
getFeeIssuerKit(allegedFeeMintAccess: any): globalThis.IssuerKit<"nat">;
|
|
18
|
-
getFeeIssuer(): globalThis.Issuer<"nat">;
|
|
18
|
+
getFeeIssuer(): globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
19
19
|
getFeeBrand(): globalThis.Brand<"nat">;
|
|
20
20
|
};
|
|
21
21
|
feeMintAccess: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function prepareInvitationKit(baggage: import("@agoric/vat-data").Baggage, shutdownZoeVat?: import("@agoric/swingset-vat").ShutdownWithFailure | undefined): {
|
|
2
|
-
invitationIssuer: globalThis.Issuer<"set">;
|
|
3
|
-
invitationKit: globalThis.IssuerKit<"set">;
|
|
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,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;
|
|
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"}
|
|
@@ -28,6 +28,9 @@ export const prepareInvitationKit = (baggage, shutdownZoeVat = undefined) => {
|
|
|
28
28
|
// Upgrade this legacy state by simply deleting it.
|
|
29
29
|
invitationKitBaggage.delete(ZOE_INVITATION_KIT);
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
/** @type {IssuerKit<'set', InvitationDetails>} */
|
|
33
|
+
// @ts-expect-error cast
|
|
31
34
|
const invitationKit = prepareIssuerKit(
|
|
32
35
|
invitationKitBaggage,
|
|
33
36
|
'Zoe Invitation',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA8BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA8BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAkR/B"}
|
|
@@ -135,7 +135,7 @@ export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
|
|
|
135
135
|
currentAllocation: initialAllocation,
|
|
136
136
|
proposal,
|
|
137
137
|
exitObj,
|
|
138
|
-
offerResult: undefined,
|
|
138
|
+
offerResult: /** @type {any} */ (undefined),
|
|
139
139
|
offerResultStored: offerResultIsUndefined,
|
|
140
140
|
instanceAdminHelper,
|
|
141
141
|
withdrawFacet,
|
|
@@ -217,7 +217,7 @@ export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
const pKit = ephemeralOfferResultStore.get(facets.userSeat);
|
|
220
|
-
E.when(
|
|
220
|
+
void E.when(
|
|
221
221
|
offerResultPromise,
|
|
222
222
|
offerResult => {
|
|
223
223
|
// Resolve the ephemeral promise for offerResult
|
|
@@ -240,7 +240,8 @@ export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
|
|
|
240
240
|
ephemeralOfferResultStore.delete(facets.userSeat);
|
|
241
241
|
} catch (err) {
|
|
242
242
|
console.warn(
|
|
243
|
-
|
|
243
|
+
'non-durable offer result will be lost upon zoe vat termination:',
|
|
244
|
+
offerResult,
|
|
244
245
|
);
|
|
245
246
|
}
|
|
246
247
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAoCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,wBAEvB,OAAO,YAAY,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAoCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,wBAEvB,OAAO,YAAY,EAAE,aAAa,CAsW9C;wBA/Wc,OAAO,sBAAsB,EAAE,SAAS;6BAD5B,kBAAkB"}
|
|
@@ -274,9 +274,13 @@ export const makeStartInstance = (
|
|
|
274
274
|
},
|
|
275
275
|
);
|
|
276
276
|
|
|
277
|
+
/**
|
|
278
|
+
* @type {import('./utils.js').StartInstance}
|
|
279
|
+
*/
|
|
277
280
|
const startInstance = async (
|
|
278
281
|
installationP,
|
|
279
282
|
uncleanIssuerKeywordRecord = harden({}),
|
|
283
|
+
// @ts-expect-error FIXME may not match the expected terms of SF
|
|
280
284
|
customTerms = harden({}),
|
|
281
285
|
privateArgs = undefined,
|
|
282
286
|
instanceLabel = '',
|
|
@@ -330,6 +334,7 @@ export const makeStartInstance = (
|
|
|
330
334
|
void watchForAdminNodeDone(adminNode, instanceAdmin);
|
|
331
335
|
|
|
332
336
|
/** @type {ZoeInstanceAdmin} */
|
|
337
|
+
// @ts-expect-error XXX saveIssuer
|
|
333
338
|
const zoeInstanceAdminForZcf = makeZoeInstanceAdmin(
|
|
334
339
|
zoeInstanceStorageManager,
|
|
335
340
|
instanceAdmin,
|
|
@@ -355,6 +360,7 @@ export const makeStartInstance = (
|
|
|
355
360
|
|
|
356
361
|
// creatorInvitation can be undefined, but if it is defined,
|
|
357
362
|
// let's make sure it is an invitation.
|
|
363
|
+
// @ts-expect-error cast
|
|
358
364
|
return E.when(
|
|
359
365
|
Promise.all([
|
|
360
366
|
creatorInvitationP,
|
|
@@ -383,6 +389,5 @@ export const makeStartInstance = (
|
|
|
383
389
|
},
|
|
384
390
|
);
|
|
385
391
|
};
|
|
386
|
-
// @ts-expect-error cast
|
|
387
392
|
return harden(startInstance);
|
|
388
393
|
};
|
|
@@ -43,7 +43,7 @@ type ZoeService = {
|
|
|
43
43
|
getBundleIDFromInstallation: GetBundleIDFromInstallation;
|
|
44
44
|
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => Pattern | undefined;
|
|
45
45
|
};
|
|
46
|
-
type GetInvitationIssuer = () => Promise<Issuer<"set">>;
|
|
46
|
+
type GetInvitationIssuer = () => Promise<Issuer<"set", InvitationDetails>>;
|
|
47
47
|
type GetFeeIssuer = () => Promise<Issuer<"nat">>;
|
|
48
48
|
type GetConfiguration = () => {
|
|
49
49
|
feeIssuerConfig: FeeIssuerConfig;
|
|
@@ -161,7 +161,7 @@ type ProposalRecord = {
|
|
|
161
161
|
* { Asset: AmountMath.make(assetBrand, 5n), Price:
|
|
162
162
|
* AmountMath.make(priceBrand, 9n) }
|
|
163
163
|
*/
|
|
164
|
-
type AmountKeywordRecord = Record<Keyword,
|
|
164
|
+
type AmountKeywordRecord = Record<Keyword, import("@agoric/ertp/exported.js").AnyAmount>;
|
|
165
165
|
type Waker = {
|
|
166
166
|
wake: () => void;
|
|
167
167
|
};
|