@agoric/zoe 0.26.3-dev-727699e.0 → 0.26.3-dev-baa7c08.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 +226 -236
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +15 -15
- package/src/cleanProposal.d.ts +1 -0
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +4 -0
- package/src/contractFacet/exit.d.ts +1 -1
- package/src/contractFacet/exit.d.ts.map +1 -1
- package/src/contractFacet/types.d.ts +174 -0
- package/src/contractFacet/types.d.ts.map +1 -0
- package/src/contractFacet/{types-ambient.d.ts → types.ts} +42 -23
- package/src/contractFacet/vatRoot.d.ts +8 -2
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/vatRoot.js +5 -4
- package/src/contractFacet/zcfMint.d.ts +1 -0
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +4 -2
- package/src/contractFacet/zcfSeat.d.ts.map +1 -1
- package/src/contractFacet/zcfSeat.js +1 -0
- package/src/contractFacet/zcfZygote.d.ts +9 -1
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +15 -3
- package/src/contractSupport/atomicTransfer.d.ts +6 -0
- package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
- package/src/contractSupport/atomicTransfer.js +4 -0
- package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +1 -0
- package/src/contractSupport/types-ambient.d.ts.map +1 -1
- package/src/contractSupport/types-ambient.js +1 -0
- package/src/contractSupport/zoeHelpers.d.ts +5 -0
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.js +1 -0
- package/src/contracts/atomicSwap.d.ts +1 -1
- package/src/contracts/auction/index.d.ts +3 -3
- package/src/contracts/automaticRefund.d.ts +3 -3
- package/src/contracts/autoswap.d.ts +4 -0
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +4 -0
- package/src/contracts/barterExchange.d.ts +2 -2
- package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
- package/src/contracts/coveredCall-durable.d.ts +1 -1
- package/src/contracts/coveredCall.d.ts +1 -1
- package/src/contracts/loan/index.d.ts +1 -1
- package/src/contracts/loan/types-ambient.d.ts +13 -13
- package/src/contracts/loan/types-ambient.d.ts.map +1 -1
- package/src/contracts/loan/types-ambient.js +17 -17
- package/src/contracts/mintPayments.d.ts +2 -2
- package/src/contracts/oracle.d.ts +3 -0
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +1 -0
- package/src/contracts/priceAggregator.d.ts +2 -0
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +6 -2
- package/src/contracts/scaledPriceAuthority.d.ts +1 -0
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +1 -0
- package/src/contracts/sellItems.d.ts +1 -1
- package/src/contracts/simpleExchange.d.ts +5 -0
- package/src/contracts/simpleExchange.d.ts.map +1 -1
- package/src/contracts/simpleExchange.js +4 -0
- package/src/contracts/types-ambient.d.ts +7 -7
- package/src/contracts/types-ambient.d.ts.map +1 -1
- package/src/contracts/types-ambient.js +7 -7
- package/src/contracts/valueVow.contract.d.ts +4 -0
- package/src/contracts/valueVow.contract.d.ts.map +1 -1
- package/src/contracts/valueVow.contract.js +1 -0
- package/src/internal-types.d.ts +6 -1
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +5 -0
- package/src/typeGuards.d.ts +7 -5
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +4 -3
- package/src/types-index.d.ts +3 -0
- package/src/types-index.js +2 -0
- package/src/zoeService/feeMint.d.ts +1 -0
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/feeMint.js +4 -0
- package/src/zoeService/installationStorage.d.ts +3 -2
- package/src/zoeService/installationStorage.d.ts.map +1 -1
- package/src/zoeService/installationStorage.js +1 -0
- package/src/zoeService/internal-types.d.ts +9 -3
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +8 -3
- package/src/zoeService/invitationQueries.d.ts +3 -3
- package/src/zoeService/invitationQueries.js +3 -3
- package/src/zoeService/makeInvitation.d.ts +1 -0
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +3 -0
- package/src/zoeService/offer/offer.d.ts +1 -0
- package/src/zoeService/offer/offer.d.ts.map +1 -1
- package/src/zoeService/offer/offer.js +3 -1
- package/src/zoeService/types-ambient.d.ts +0 -226
- package/src/zoeService/types-ambient.d.ts.map +1 -1
- package/src/zoeService/types-ambient.js +4 -327
- package/src/zoeService/types.d.ts +235 -0
- package/src/zoeService/types.d.ts.map +1 -0
- package/src/zoeService/types.ts +299 -0
- package/src/zoeService/utils.d.ts +1 -4
- package/src/zoeService/utils.test-d.ts +1 -0
- package/src/zoeService/zoe.d.ts +11 -1
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +8 -1
- package/src/zoeService/zoeStorageManager.d.ts +5 -5
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +4 -1
- package/tools/scriptedOracle.d.ts +6 -2
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +4 -0
- package/tools/setup-zoe.d.ts +4 -3
- package/tools/setup-zoe.d.ts.map +1 -1
- package/tools/setup-zoe.js +4 -0
- package/src/contractFacet/internal-types.d.ts +0 -8
- package/src/contractFacet/internal-types.d.ts.map +0 -1
- package/src/contractFacet/internal-types.js +0 -15
- package/src/contractFacet/types-ambient.js +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @property {() => Amount} getAvailableItems
|
|
5
5
|
*
|
|
6
6
|
* @typedef {object} SellItemsCreatorOnly
|
|
7
|
-
* @property {() => Promise<Invitation>} makeBuyerInvitation
|
|
7
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeBuyerInvitation
|
|
8
8
|
*
|
|
9
9
|
* @typedef {SellItemsPublicFacet & SellItemsCreatorOnly} SellItemsCreatorFacet
|
|
10
10
|
*/
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
/**
|
|
32
32
|
* @typedef {object} AutomaticRefundPublicFacet
|
|
33
33
|
* @property {() => bigint} getOffersCount
|
|
34
|
-
* @property {() => Promise<Invitation>} makeInvitation
|
|
34
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeInvitation
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @typedef {object} AutoswapPublicFacet
|
|
39
|
-
* @property {() => Promise<Invitation>} makeSwapInvitation synonym for
|
|
39
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapInvitation synonym for
|
|
40
40
|
* makeSwapInInvitation
|
|
41
|
-
* @property {() => Promise<Invitation>} makeSwapInInvitation make an invitation
|
|
41
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapInInvitation make an invitation
|
|
42
42
|
* that allows one to do a swap in which the In amount is specified and the Out
|
|
43
43
|
* amount is calculated
|
|
44
|
-
* @property {() => Promise<Invitation>} makeSwapOutInvitation make an invitation
|
|
44
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapOutInvitation make an invitation
|
|
45
45
|
* that allows one to do a swap in which the Out amount is specified and the In
|
|
46
46
|
* amount is calculated
|
|
47
|
-
* @property {() => Promise<Invitation>} makeAddLiquidityInvitation make an
|
|
47
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeAddLiquidityInvitation make an
|
|
48
48
|
* invitation that allows one to add liquidity to the pool.
|
|
49
|
-
* @property {() => Promise<Invitation>} makeRemoveLiquidityInvitation make an
|
|
49
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeRemoveLiquidityInvitation make an
|
|
50
50
|
* invitation that allows one to remove liquidity from the pool.
|
|
51
51
|
* @property {() => Issuer} getLiquidityIssuer
|
|
52
52
|
* @property {() => bigint} getLiquiditySupply get the current value of
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @import {ContractMeta, ContractStartFn, HandleOffer, Invitation, OfferHandler, TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
2
3
|
* @import { Baggage } from '@agoric/vat-data';
|
|
3
4
|
*/
|
|
4
5
|
/** @type {ContractMeta<typeof start>} */
|
|
@@ -13,5 +14,8 @@ export function start(zcf: ZCF<{}>, _privateArgs: undefined, baggage: Baggage):
|
|
|
13
14
|
}>>;
|
|
14
15
|
}>;
|
|
15
16
|
};
|
|
17
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
18
|
+
import type { ZCF } from '@agoric/zoe';
|
|
16
19
|
import type { Baggage } from '@agoric/vat-data';
|
|
20
|
+
import type { Invitation } from '@agoric/zoe';
|
|
17
21
|
//# sourceMappingURL=valueVow.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,IAAI,EAAE,CAAC,gBACP,SAAS,WACT,OAAO;;;;;;mBA8B4B,OAAO;;;EAWpD;kCA1DkH,aAAa;yBAAb,aAAa;6BACpG,kBAAkB;gCADqE,aAAa"}
|
|
@@ -2,6 +2,7 @@ import { prepareVowTools } from '@agoric/vow';
|
|
|
2
2
|
import { makeDurableZone } from '@agoric/zone/durable.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
+
* @import {ContractMeta, ContractStartFn, HandleOffer, Invitation, OfferHandler, TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
5
6
|
* @import { Baggage } from '@agoric/vat-data';
|
|
6
7
|
*/
|
|
7
8
|
|
package/src/internal-types.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ type ZCFRoot = {
|
|
|
117
117
|
};
|
|
118
118
|
type ExecuteContractResult = {
|
|
119
119
|
creatorFacet: object;
|
|
120
|
-
creatorInvitation?: Promise<Invitation
|
|
120
|
+
creatorInvitation?: Promise<globalThis.Invitation> | undefined;
|
|
121
121
|
publicFacet: object;
|
|
122
122
|
handleOfferObj: HandleOfferObj;
|
|
123
123
|
};
|
|
@@ -162,4 +162,9 @@ type InstanceState = {
|
|
|
162
162
|
getBrands: () => BrandKeywordRecord;
|
|
163
163
|
assertUniqueKeyword: (keyword: Keyword) => void;
|
|
164
164
|
};
|
|
165
|
+
import type { Completion } from '@agoric/zoe';
|
|
166
|
+
import type { ContractStartFn } from '@agoric/zoe';
|
|
167
|
+
import type { PaymentPKeywordRecord } from '@agoric/zoe';
|
|
168
|
+
import type { UserSeat } from '@agoric/zoe';
|
|
169
|
+
import type { Pattern } from '@endo/patterns';
|
|
165
170
|
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";cAUc,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,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BACb,MAAM,KACJ,OAAO,CAAC,qBAAqB,CAAC;sCAKhC,MAAM,KACJ,OAAO,CAAC,gCAAgC,CAAC;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;uBACX,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;;gCAlTuC,aAAa;qCAAb,aAAa;2CAAb,aAAa;8BAAb,aAAa;6BAClE,gBAAgB"}
|
package/src/internal-types.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
/// <reference types="@agoric/ertp/exported" />
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @import {Completion, ContractStartFn, PaymentPKeywordRecord, UserSeat} from '@agoric/zoe';
|
|
6
|
+
* @import {Pattern} from '@endo/patterns';
|
|
7
|
+
*/
|
|
8
|
+
|
|
4
9
|
/**
|
|
5
10
|
* @typedef {object} SeatData
|
|
6
11
|
* @property {ProposalRecord} proposal
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
+
* @import {AfterDeadlineExitRule} from '@agoric/zoe';
|
|
3
4
|
*/
|
|
4
5
|
export const KeywordShape: import("@endo/patterns").Matcher;
|
|
5
6
|
/** @type {TypedPattern<InvitationHandle>} */
|
|
@@ -38,10 +39,10 @@ export namespace FullProposalShape {
|
|
|
38
39
|
export const ProposalShape: import("@endo/patterns").Matcher;
|
|
39
40
|
export const EmptyProposalShape: import("@endo/patterns").Matcher;
|
|
40
41
|
export function isOnDemandExitRule(exit: any): boolean;
|
|
41
|
-
export function isWaivedExitRule(exit: ExitRule): exit is WaivedExitRule;
|
|
42
|
-
export function isAfterDeadlineExitRule(exit: ExitRule): exit is AfterDeadlineExitRule;
|
|
43
|
-
/** @type {TypedPattern<InvitationDetails>} */
|
|
44
|
-
export const InvitationElementShape: TypedPattern<InvitationDetails>;
|
|
42
|
+
export function isWaivedExitRule(exit: import("./types-index").ExitRule): exit is WaivedExitRule;
|
|
43
|
+
export function isAfterDeadlineExitRule(exit: import("./types-index").ExitRule): exit is AfterDeadlineExitRule;
|
|
44
|
+
/** @type {TypedPattern<import('./types-index').InvitationDetails>} */
|
|
45
|
+
export const InvitationElementShape: TypedPattern<import("./types-index").InvitationDetails>;
|
|
45
46
|
export const OfferHandlerI: import("@endo/patterns").InterfaceGuard<{
|
|
46
47
|
handle: import("@endo/patterns").MethodGuard;
|
|
47
48
|
}>;
|
|
@@ -166,8 +167,9 @@ export const HandleOfferI: import("@endo/patterns").InterfaceGuard<{
|
|
|
166
167
|
}>;
|
|
167
168
|
export namespace PriceQuoteShape {
|
|
168
169
|
export { AmountShape as quoteAmount };
|
|
169
|
-
export let quotePayment:
|
|
170
|
+
export let quotePayment: Pattern;
|
|
170
171
|
}
|
|
171
172
|
import type { TypedPattern } from '@agoric/internal';
|
|
173
|
+
import type { AfterDeadlineExitRule } from '@agoric/zoe';
|
|
172
174
|
import { AmountShape } from '@agoric/ertp';
|
|
173
175
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;;GAGG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,iEAOE;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,qBAAqB,CAKzC;AAGD,sEAAsE;AACtE,qCADW,aAAa,OAAO,eAAe,EAAE,iBAAiB,CAAC,CAM/D;AAEH;;GAEG;AAEH,0EAGG;AAEH,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAAuD;AACvD,2DAGE;AAEF,0EAQE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;GAKG;AAEH,6DASE;AAEF;;GAKG;;;;;kCA9X4B,kBAAkB;2CACT,aAAa;4BAP9C,cAAc"}
|
package/src/typeGuards.js
CHANGED
|
@@ -15,6 +15,7 @@ import { TimestampShape } from '@agoric/time';
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @import {TypedPattern} from '@agoric/internal';
|
|
18
|
+
* @import {AfterDeadlineExitRule} from '@agoric/zoe';
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
21
|
// keywords have an initial cap
|
|
@@ -114,7 +115,7 @@ export const isOnDemandExitRule = exit => {
|
|
|
114
115
|
harden(isOnDemandExitRule);
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
|
-
* @param {ExitRule} exit
|
|
118
|
+
* @param {import('./types-index').ExitRule} exit
|
|
118
119
|
* @returns {exit is WaivedExitRule}
|
|
119
120
|
*/
|
|
120
121
|
export const isWaivedExitRule = exit => {
|
|
@@ -124,7 +125,7 @@ export const isWaivedExitRule = exit => {
|
|
|
124
125
|
harden(isWaivedExitRule);
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
|
-
* @param {ExitRule} exit
|
|
128
|
+
* @param {import('./types-index').ExitRule} exit
|
|
128
129
|
* @returns {exit is AfterDeadlineExitRule}
|
|
129
130
|
*/
|
|
130
131
|
export const isAfterDeadlineExitRule = exit => {
|
|
@@ -133,7 +134,7 @@ export const isAfterDeadlineExitRule = exit => {
|
|
|
133
134
|
};
|
|
134
135
|
harden(isAfterDeadlineExitRule);
|
|
135
136
|
|
|
136
|
-
/** @type {TypedPattern<InvitationDetails>} */
|
|
137
|
+
/** @type {TypedPattern<import('./types-index').InvitationDetails>} */
|
|
137
138
|
export const InvitationElementShape = M.splitRecord({
|
|
138
139
|
description: M.string(),
|
|
139
140
|
handle: InvitationHandleShape,
|
|
@@ -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":";;;;;;;;;AA+BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D;qCA5E6C,aAAa"}
|
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
import { Fail, q } from '@endo/errors';
|
|
15
15
|
import { FeeMintAccessShape } from '../typeGuards.js';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @import {FeeIssuerConfig, ZoeService} from '@agoric/zoe';
|
|
19
|
+
*/
|
|
20
|
+
|
|
17
21
|
/** @deprecated Redundant. Just omit it. */
|
|
18
22
|
const FEE_MINT_KIT = 'FeeMintKit';
|
|
19
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zoeBaggage: Baggage): import("@endo/exo").Guarded<{
|
|
2
|
-
installBundle(allegedBundle: any, bundleLabel: any): Promise<Installation
|
|
3
|
-
installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<unknown>>;
|
|
2
|
+
installBundle(allegedBundle: any, bundleLabel: any): Promise<globalThis.Installation>;
|
|
3
|
+
installBundleID(bundleID: any, bundleLabel?: any): Promise<globalThis.Installation<unknown>>;
|
|
4
4
|
unwrapInstallation(installation: any): {
|
|
5
5
|
bundleCap: any;
|
|
6
6
|
bundleID: string;
|
|
@@ -15,4 +15,5 @@ export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zo
|
|
|
15
15
|
getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
|
|
16
16
|
}>;
|
|
17
17
|
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
18
|
+
import type { SourceBundle } from '@agoric/zoe';
|
|
18
19
|
//# sourceMappingURL=installationStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAyBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA6IjB;6BAtJyB,4BAA4B;kCAIvB,aAAa"}
|
|
@@ -73,9 +73,9 @@ type ZoeStorageManager = {
|
|
|
73
73
|
getBrands: GetBrands;
|
|
74
74
|
getIssuers: GetIssuers;
|
|
75
75
|
getTerms: import("./utils.js").GetTerms;
|
|
76
|
-
getOfferFilter:
|
|
77
|
-
setOfferFilter:
|
|
78
|
-
getInstallationForInstance:
|
|
76
|
+
getOfferFilter: (instance: import("./utils.js").Instance<any>) => string[];
|
|
77
|
+
setOfferFilter: (instance: Instance, strings: string[]) => any;
|
|
78
|
+
getInstallationForInstance: (instance: import("./utils.js").Instance<any>) => Promise<Installation>;
|
|
79
79
|
getInstanceAdmin: GetInstanceAdmin;
|
|
80
80
|
unwrapInstallation: UnwrapInstallation;
|
|
81
81
|
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import("@endo/patterns").Pattern | undefined;
|
|
@@ -86,4 +86,10 @@ type ZoeStorageManager = {
|
|
|
86
86
|
*/
|
|
87
87
|
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import("@agoric/swingset-vat").CreateVatResults>;
|
|
88
88
|
type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<"nat">;
|
|
89
|
+
import type { FeeMintAccess } from './types.js';
|
|
90
|
+
import type { GetBrands } from './types.js';
|
|
91
|
+
import type { GetBundleIDFromInstallation } from './types.js';
|
|
92
|
+
import type { GetIssuers } from './types.js';
|
|
93
|
+
import type { InstallBundle } from './types.js';
|
|
94
|
+
import type { InstallBundleID } from './types.js';
|
|
89
95
|
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAWW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAW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AAC,QAAQ,EAAE,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC;sBACvE,gBAAgB;wBAChB,kBAAkB;mCAClB,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,gBAAgB,EAAE,OAAO,GAAG,SAAS;;;;;;wCAQvF,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC;mCAvJuF,YAAY;+BAAZ,YAAY;iDAAZ,YAAY;gCAAZ,YAAY;mCAAZ,YAAY;qCAAZ,YAAY"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
|
+
/// <reference types="@agoric/zoe/exported" />
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @import {FeeMintAccess, GetBrands, GetBundleIDFromInstallation, GetIssuers, InstallBundle, InstallBundleID} from './types.js';
|
|
6
|
+
*/
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* Create a purse for a new issuer
|
|
@@ -127,9 +132,9 @@
|
|
|
127
132
|
* @property {GetBrands} getBrands
|
|
128
133
|
* @property {GetIssuers} getIssuers
|
|
129
134
|
* @property {import('./utils.js').GetTerms} getTerms
|
|
130
|
-
* @property {
|
|
131
|
-
* @property {
|
|
132
|
-
* @property {
|
|
135
|
+
* @property {(instance: import('./utils.js').Instance<any>) => string[]} getOfferFilter
|
|
136
|
+
* @property {(instance: Instance, strings: string[]) => any} setOfferFilter
|
|
137
|
+
* @property {(instance: import('./utils.js').Instance<any>) => Promise<Installation>} getInstallationForInstance
|
|
133
138
|
* @property {GetInstanceAdmin} getInstanceAdmin
|
|
134
139
|
* @property {UnwrapInstallation} unwrapInstallation
|
|
135
140
|
* @property {(invitationHandle: InvitationHandle) => import('@endo/patterns').Pattern | undefined} getProposalShapeForInvitation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function makeInvitationQueryFns(invitationIssuer: any): {
|
|
2
|
-
getInstance: GetInstance;
|
|
3
|
-
getInstallation: GetInstallation;
|
|
4
|
-
getInvitationDetails: GetInvitationDetails;
|
|
2
|
+
getInstance: import("./types.ts").GetInstance;
|
|
3
|
+
getInstallation: import("./types.ts").GetInstallation;
|
|
4
|
+
getInvitationDetails: import("./types.ts").GetInvitationDetails;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=invitationQueries.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { X, Fail, q, makeError, annotateError } from '@endo/errors';
|
|
|
4
4
|
import { E } from '@endo/eventual-send';
|
|
5
5
|
|
|
6
6
|
export const makeInvitationQueryFns = invitationIssuer => {
|
|
7
|
-
/** @type {GetInvitationDetails} */
|
|
7
|
+
/** @type {import('./types.ts').GetInvitationDetails} */
|
|
8
8
|
const getInvitationDetails = async invitationP => {
|
|
9
9
|
const onRejected = reason => {
|
|
10
10
|
const err = makeError(
|
|
@@ -21,11 +21,11 @@ export const makeInvitationQueryFns = invitationIssuer => {
|
|
|
21
21
|
return invAmount.value[0];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
/** @type {GetInstance} */
|
|
24
|
+
/** @type {import('./types.ts').GetInstance} */
|
|
25
25
|
const getInstance = invitation =>
|
|
26
26
|
E.get(getInvitationDetails(invitation)).instance;
|
|
27
27
|
|
|
28
|
-
/** @type {GetInstallation} */
|
|
28
|
+
/** @type {import('./types.ts').GetInstallation} */
|
|
29
29
|
const getInstallation = invitation =>
|
|
30
30
|
E.get(getInvitationDetails(invitation)).installation;
|
|
31
31
|
|
|
@@ -2,4 +2,5 @@ export function prepareInvitationKit(baggage: import("@agoric/vat-data").Baggage
|
|
|
2
2
|
invitationIssuer: globalThis.Issuer<"set", InvitationDetails>;
|
|
3
3
|
invitationKit: globalThis.IssuerKit<"set", InvitationDetails>;
|
|
4
4
|
};
|
|
5
|
+
import type { InvitationDetails } from '@agoric/zoe';
|
|
5
6
|
//# sourceMappingURL=makeInvitation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAmBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;EA+BxE;uCAzCoD,aAAa"}
|
|
@@ -4,6 +4,9 @@ import { Fail, q } from '@endo/errors';
|
|
|
4
4
|
import { provideDurableMapStore } from '@agoric/vat-data';
|
|
5
5
|
import { AssetKind, hasIssuer, prepareIssuerKit } from '@agoric/ertp';
|
|
6
6
|
import { InvitationElementShape } from '../typeGuards.js';
|
|
7
|
+
/**
|
|
8
|
+
* @import {FeeIssuerConfig, InvitationDetails} from '@agoric/zoe';
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* Not deprecated because the first use below is still correct.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"AAeO,6DA0DN;2BA7DuB,aAAa"}
|
|
@@ -9,7 +9,9 @@ import { cleanProposal } from '../../cleanProposal.js';
|
|
|
9
9
|
import { burnInvitation } from './burnInvitation.js';
|
|
10
10
|
import { makeInvitationQueryFns } from '../invitationQueries.js';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @import {Offer} from '@agoric/zoe';
|
|
14
|
+
*/
|
|
13
15
|
|
|
14
16
|
export const makeOfferMethod = offerDataAccess => {
|
|
15
17
|
/** @type {Offer} */
|
|
@@ -1,227 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Zoe provides a framework for deploying and working with smart
|
|
3
|
-
* contracts. It is accessed as a long-lived and well-trusted service
|
|
4
|
-
* that enforces offer safety for the contracts that use it. Zoe has a
|
|
5
|
-
* single `invitationIssuer` for the entirety of its lifetime. By
|
|
6
|
-
* having a reference to Zoe, a user can get the `invitationIssuer`
|
|
7
|
-
* and thus validate any `invitation` they receive from someone else.
|
|
8
|
-
*
|
|
9
|
-
* Zoe has two different facets: the public Zoe service and the
|
|
10
|
-
* contract facet (ZCF). Each contract instance has a copy of ZCF
|
|
11
|
-
* within its vat. The contract and ZCF never have direct access to
|
|
12
|
-
* the users' payments or the Zoe purses.
|
|
13
|
-
*/
|
|
14
|
-
type ZoeService = {
|
|
15
|
-
/**
|
|
16
|
-
* Zoe has a single `invitationIssuer` for the entirety of its
|
|
17
|
-
* lifetime. By having a reference to Zoe, a user can get the
|
|
18
|
-
* `invitationIssuer` and thus validate any `invitation` they receive
|
|
19
|
-
* from someone else. The mint associated with the invitationIssuer
|
|
20
|
-
* creates the ERTP payments that represent the right to interact with
|
|
21
|
-
* a smart contract in particular ways.
|
|
22
|
-
*/
|
|
23
|
-
getInvitationIssuer: GetInvitationIssuer;
|
|
24
|
-
install: InstallBundle;
|
|
25
|
-
installBundleID: InstallBundleID;
|
|
26
|
-
startInstance: import("./utils.js").StartInstance;
|
|
27
|
-
offer: Offer;
|
|
28
|
-
getPublicFacet: import("./utils.js").GetPublicFacet;
|
|
29
|
-
getIssuers: GetIssuers;
|
|
30
|
-
getBrands: GetBrands;
|
|
31
|
-
getTerms: import("./utils.js").GetTerms;
|
|
32
|
-
getOfferFilter: GetOfferFilter;
|
|
33
|
-
getInstallationForInstance: GetInstallationForInstance;
|
|
34
|
-
getInstance: GetInstance;
|
|
35
|
-
getInstallation: GetInstallation;
|
|
36
|
-
/**
|
|
37
|
-
* Return an object with the instance, installation, description, invitation
|
|
38
|
-
* handle, and any custom properties specific to the contract.
|
|
39
|
-
*/
|
|
40
|
-
getInvitationDetails: GetInvitationDetails;
|
|
41
|
-
getFeeIssuer: GetFeeIssuer;
|
|
42
|
-
getConfiguration: GetConfiguration;
|
|
43
|
-
getBundleIDFromInstallation: GetBundleIDFromInstallation;
|
|
44
|
-
/**
|
|
45
|
-
* Return the pattern (if any) associated with the invitationHandle that a
|
|
46
|
-
* proposal is required to match to be accepted by zoe.offer().
|
|
47
|
-
*/
|
|
48
|
-
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import("@endo/patterns").Pattern | undefined;
|
|
49
|
-
};
|
|
50
|
-
type GetInvitationIssuer = () => Promise<Issuer<"set", InvitationDetails>>;
|
|
51
|
-
type GetFeeIssuer = () => Promise<Issuer<"nat">>;
|
|
52
|
-
type GetConfiguration = () => {
|
|
53
|
-
feeIssuerConfig: FeeIssuerConfig;
|
|
54
|
-
};
|
|
55
|
-
type GetIssuers = (instance: import("./utils.js").Instance<any>) => Promise<IssuerKeywordRecord>;
|
|
56
|
-
type GetBrands = (instance: import("./utils.js").Instance<any>) => Promise<BrandKeywordRecord>;
|
|
57
|
-
type GetOfferFilter = (instance: import("./utils.js").Instance<any>) => string[];
|
|
58
|
-
type SetOfferFilter = (instance: Instance, strings: string[]) => any;
|
|
59
|
-
type GetInstallationForInstance = (instance: import("./utils.js").Instance<any>) => Promise<Installation>;
|
|
60
|
-
type GetInstance = (invitation: ERef<Invitation>) => Promise<import("./utils.js").Instance<any>>;
|
|
61
|
-
type GetInstallation = (invitation: ERef<Invitation>) => Promise<Installation>;
|
|
62
|
-
type GetInvitationDetails = (invitation: ERef<Invitation<any, any>>) => Promise<InvitationDetails>;
|
|
63
|
-
/**
|
|
64
|
-
* Create an installation by safely evaluating the code and
|
|
65
|
-
* registering it with Zoe. Returns an installation.
|
|
66
|
-
*/
|
|
67
|
-
type InstallBundle = (bundle: Bundle | SourceBundle, bundleLabel?: string | undefined) => Promise<Installation>;
|
|
68
|
-
/**
|
|
69
|
-
* Create an installation from a Bundle ID. Returns an installation.
|
|
70
|
-
*/
|
|
71
|
-
type InstallBundleID = (bundleID: BundleID, bundleLabel?: string | undefined) => Promise<Installation>;
|
|
72
|
-
/**
|
|
73
|
-
* Verify that an alleged Installation is real, and return the Bundle ID it
|
|
74
|
-
* will use for contract code.
|
|
75
|
-
*/
|
|
76
|
-
type GetBundleIDFromInstallation = (allegedInstallation: ERef<Installation>) => Promise<BundleID>;
|
|
77
|
-
/**
|
|
78
|
-
* To redeem an invitation, the user normally provides a proposal (their
|
|
79
|
-
* rules for the offer) as well as payments to be escrowed by Zoe. If
|
|
80
|
-
* either the proposal or payments would be empty, indicate this by
|
|
81
|
-
* omitting that argument or passing undefined, rather than passing an
|
|
82
|
-
* empty record.
|
|
83
|
-
*
|
|
84
|
-
* The proposal has three parts: `want` and `give` are used by Zoe to
|
|
85
|
-
* enforce offer safety, and `exit` is used to specify the particular
|
|
86
|
-
* payout-liveness policy that Zoe can guarantee. `want` and `give`
|
|
87
|
-
* are objects with keywords as keys and amounts as values.
|
|
88
|
-
* `paymentKeywordRecord` is a record with keywords as keys, and the
|
|
89
|
-
* values are the actual payments to be escrowed. A payment is
|
|
90
|
-
* expected for every rule under `give`.
|
|
91
|
-
*/
|
|
92
|
-
type Offer = <Result, Args = undefined>(invitation: ERef<Invitation<Result, Args>>, proposal?: Proposal, paymentKeywordRecord?: PaymentPKeywordRecord, offerArgs?: Args) => Promise<UserSeat<Result>>;
|
|
93
|
-
/**
|
|
94
|
-
* Zoe uses seats to access or manipulate offers. They let contracts and users
|
|
95
|
-
* interact with them. Zoe has two kinds of seats. ZCFSeats are used within
|
|
96
|
-
* contracts and with zcf methods. UserSeats represent offers external to Zoe
|
|
97
|
-
* and the contract. The party who exercises an invitation and sends the offer()
|
|
98
|
-
* message to Zoe gets a UserSeat that can check payouts' status or retrieve the
|
|
99
|
-
* result of processing the offer in the contract. This varies, but examples are
|
|
100
|
-
* a string and an invitation for another seat.
|
|
101
|
-
*
|
|
102
|
-
* Also, a UserSeat can be handed to an agent outside Zoe and the contract,
|
|
103
|
-
* letting them query or monitor the current state, access the payouts and
|
|
104
|
-
* result, and, if it's allowed for this seat, call tryExit().
|
|
105
|
-
*
|
|
106
|
-
* Since anyone can attempt to exit the seat if they have a reference to it, you
|
|
107
|
-
* should only share a UserSeat with trusted parties.
|
|
108
|
-
*
|
|
109
|
-
* UserSeat includes queries for the associated offer's current state and an
|
|
110
|
-
* operation to request that the offer exit, as follows:
|
|
111
|
-
*/
|
|
112
|
-
type UserSeat<OR extends unknown = unknown> = {
|
|
113
|
-
getProposal: () => Promise<ProposalRecord>;
|
|
114
|
-
/**
|
|
115
|
-
* returns a promise for a KeywordPaymentRecord containing all the payouts from
|
|
116
|
-
* this seat. The promise will resolve after the seat has exited.
|
|
117
|
-
*/
|
|
118
|
-
getPayouts: () => Promise<PaymentPKeywordRecord>;
|
|
119
|
-
/**
|
|
120
|
-
* returns a promise for the Payment corresponding to the indicated keyword.
|
|
121
|
-
* The promise will resolve after the seat has exited. If there is no payment
|
|
122
|
-
* corresponding to the keyword, an error will be thrown. (It used to return
|
|
123
|
-
* undefined.)
|
|
124
|
-
*/
|
|
125
|
-
getPayout: (keyword: Keyword) => Promise<Payment<any, any>>;
|
|
126
|
-
getOfferResult: () => Promise<OR>;
|
|
127
|
-
/**
|
|
128
|
-
* Note: Only works if the seat's `proposal` has an `OnDemand` `exit` clause. Zoe's
|
|
129
|
-
* offer-safety guarantee applies no matter how a seat's interaction with a
|
|
130
|
-
* contract ends. Under normal circumstances, the participant might be able to
|
|
131
|
-
* call `tryExit()`, or the contract might do something explicitly. On exiting,
|
|
132
|
-
* the seat holder gets its current `allocation` and the `seat` can no longer
|
|
133
|
-
* interact with the contract.
|
|
134
|
-
*/
|
|
135
|
-
tryExit?: (() => void) | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* Returns true if the seat has exited, false if it is still active.
|
|
138
|
-
*/
|
|
139
|
-
hasExited: () => Promise<boolean>;
|
|
140
|
-
/**
|
|
141
|
-
* returns 1 if the proposal's
|
|
142
|
-
* want clause was satisfied by the final allocation, otherwise 0. This is
|
|
143
|
-
* numeric to support a planned enhancement called "multiples" which will allow
|
|
144
|
-
* the return value to be any non-negative number. The promise will resolve
|
|
145
|
-
* after the seat has exited.
|
|
146
|
-
*/
|
|
147
|
-
numWantsSatisfied: () => Promise<0 | 1>;
|
|
148
|
-
/**
|
|
149
|
-
* return a promise for the final allocation. The promise will resolve after the
|
|
150
|
-
* seat has exited.
|
|
151
|
-
*/
|
|
152
|
-
getFinalAllocation: () => Promise<Allocation>;
|
|
153
|
-
/**
|
|
154
|
-
* returns a subscriber that
|
|
155
|
-
* will be notified when the seat has exited or failed.
|
|
156
|
-
*/
|
|
157
|
-
getExitSubscriber: () => Subscriber<Completion>;
|
|
158
|
-
};
|
|
159
|
-
type Proposal = Partial<ProposalRecord>;
|
|
160
|
-
type ProposalRecord = {
|
|
161
|
-
give: AmountKeywordRecord;
|
|
162
|
-
want: AmountKeywordRecord;
|
|
163
|
-
exit: ExitRule;
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* The keys are keywords, and the values are amounts. For example:
|
|
167
|
-
* { Asset: AmountMath.make(assetBrand, 5n), Price:
|
|
168
|
-
* AmountMath.make(priceBrand, 9n) }
|
|
169
|
-
*/
|
|
170
|
-
type AmountKeywordRecord = Record<Keyword, import("@agoric/ertp/src/types.js").AnyAmount>;
|
|
171
|
-
type Waker = {
|
|
172
|
-
wake: () => void;
|
|
173
|
-
};
|
|
174
|
-
type OnDemandExitRule = {
|
|
175
|
-
onDemand: null;
|
|
176
|
-
};
|
|
177
|
-
type WaivedExitRule = {
|
|
178
|
-
waived: null;
|
|
179
|
-
};
|
|
180
|
-
type AfterDeadlineExitRule = {
|
|
181
|
-
afterDeadline: {
|
|
182
|
-
timer: import("@agoric/time").TimerService;
|
|
183
|
-
deadline: import("@agoric/time").Timestamp;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* The possible keys are 'waived', 'onDemand', and 'afterDeadline'.
|
|
188
|
-
* `timer` and `deadline` only are used for the `afterDeadline` key.
|
|
189
|
-
* The possible records are:
|
|
190
|
-
* `{ waived: null }`
|
|
191
|
-
* `{ onDemand: null }`
|
|
192
|
-
* `{ afterDeadline: { timer :Timer<Deadline>, deadline :Deadline } }`
|
|
193
|
-
*/
|
|
194
|
-
type ExitRule = OnDemandExitRule | WaivedExitRule | AfterDeadlineExitRule;
|
|
195
|
-
type Instance = import("./utils.js").Instance<any>;
|
|
196
|
-
type ZCFSpec = {
|
|
197
|
-
bundleCap: import("@agoric/swingset-vat").BundleCap;
|
|
198
|
-
} | {
|
|
199
|
-
name: string;
|
|
200
|
-
} | {
|
|
201
|
-
id: BundleID;
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Opaque type for a JSONable source bundle
|
|
205
|
-
*/
|
|
206
|
-
type SourceBundle = Record<string, any>;
|
|
207
|
-
type PaymentPKeywordRecord = Record<Keyword, ERef<Payment<any>>>;
|
|
208
|
-
type PaymentKeywordRecord = Record<Keyword, Payment<any>>;
|
|
209
|
-
type InvitationDetails = {
|
|
210
|
-
installation: Installation;
|
|
211
|
-
instance: import("./utils.js").Instance<any>;
|
|
212
|
-
handle: InvitationHandle;
|
|
213
|
-
description: string;
|
|
214
|
-
customDetails?: Record<string, any> | undefined;
|
|
215
|
-
};
|
|
216
|
-
type Installation<SF = any> = import("./utils.js").Installation<SF>;
|
|
217
|
-
type InstallationStart<I extends Installation> = import("./utils.js").InstallationStart<I>;
|
|
218
|
-
type FeeIssuerConfig = {
|
|
219
|
-
name: string;
|
|
220
|
-
assetKind: AssetKind;
|
|
221
|
-
displayInfo: DisplayInfo;
|
|
222
|
-
};
|
|
223
|
-
type ZoeFeesConfig = {
|
|
224
|
-
getPublicFacetFee: NatValue;
|
|
225
|
-
};
|
|
226
|
-
type FeeMintAccess = Handle<"feeMintAccess">;
|
|
227
1
|
//# 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":""}
|