@agoric/zoe 0.26.3-dev-da3b8a8.0 → 0.26.3-dev-7710838.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 +189 -199
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +15 -12
- package/src/contractFacet/zcfZygote.js +3 -4
- package/src/contractSupport/ratio.js +1 -1
- package/src/contracts/callSpread/calculateShares.js +1 -1
- package/src/contracts/callSpread/fundedCallSpread.js +1 -1
- package/src/contracts/callSpread/payoffHandler.js +1 -1
- package/src/contracts/callSpread/pricedCallSpread.js +1 -1
- package/src/contracts/exported.js +1 -1
- package/src/contracts/loan/close.js +1 -1
- package/src/contracts/priceAggregator.js +1 -1
- package/src/zoeService/escrowStorage.js +1 -1
- package/src/zoeService/zoe.js +3 -4
- package/src/zoeService/zoeStorageManager.js +1 -1
- package/bundles/bundle-contractFacet.d.ts +0 -7
- package/bundles/bundle-contractFacet.d.ts.map +0 -1
- package/src/cleanProposal.d.ts +0 -9
- package/src/cleanProposal.d.ts.map +0 -1
- package/src/contractFacet/allocationMath.d.ts +0 -7
- package/src/contractFacet/allocationMath.d.ts.map +0 -1
- package/src/contractFacet/evalContractCode.d.ts +0 -2
- package/src/contractFacet/evalContractCode.d.ts.map +0 -1
- package/src/contractFacet/exit.d.ts +0 -2
- package/src/contractFacet/exit.d.ts.map +0 -1
- package/src/contractFacet/internal-types.d.ts +0 -8
- package/src/contractFacet/internal-types.d.ts.map +0 -1
- package/src/contractFacet/offerHandlerStorage.d.ts +0 -5
- package/src/contractFacet/offerHandlerStorage.d.ts.map +0 -1
- package/src/contractFacet/offerSafety.d.ts +0 -34
- package/src/contractFacet/offerSafety.d.ts.map +0 -1
- package/src/contractFacet/reallocate.d.ts +0 -3
- package/src/contractFacet/reallocate.d.ts.map +0 -1
- package/src/contractFacet/rightsConservation.d.ts +0 -12
- package/src/contractFacet/rightsConservation.d.ts.map +0 -1
- package/src/contractFacet/vatRoot.d.ts +0 -14
- package/src/contractFacet/vatRoot.d.ts.map +0 -1
- package/src/contractFacet/zcfMint.d.ts +0 -6
- package/src/contractFacet/zcfMint.d.ts.map +0 -1
- package/src/contractFacet/zcfSeat.d.ts +0 -3
- package/src/contractFacet/zcfSeat.d.ts.map +0 -1
- package/src/contractFacet/zcfZygote.d.ts +0 -3
- package/src/contractFacet/zcfZygote.d.ts.map +0 -1
- package/src/contractSupport/atomicTransfer.d.ts +0 -6
- package/src/contractSupport/atomicTransfer.d.ts.map +0 -1
- package/src/contractSupport/bondingCurves.d.ts +0 -6
- package/src/contractSupport/bondingCurves.d.ts.map +0 -1
- package/src/contractSupport/durability.d.ts +0 -5
- package/src/contractSupport/durability.d.ts.map +0 -1
- package/src/contractSupport/index.d.ts +0 -13
- package/src/contractSupport/index.d.ts.map +0 -1
- package/src/contractSupport/priceAuthority.d.ts +0 -37
- package/src/contractSupport/priceAuthority.d.ts.map +0 -1
- package/src/contractSupport/priceAuthorityInitial.d.ts +0 -3
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +0 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +0 -2
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +0 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts +0 -15
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +0 -1
- package/src/contractSupport/priceQuote.d.ts +0 -7
- package/src/contractSupport/priceQuote.d.ts.map +0 -1
- package/src/contractSupport/ratio.d.ts +0 -28
- package/src/contractSupport/ratio.d.ts.map +0 -1
- package/src/contractSupport/recorder.d.ts +0 -229
- package/src/contractSupport/recorder.d.ts.map +0 -1
- package/src/contractSupport/safeMath.d.ts +0 -11
- package/src/contractSupport/safeMath.d.ts.map +0 -1
- package/src/contractSupport/stateMachine.d.ts +0 -6
- package/src/contractSupport/stateMachine.d.ts.map +0 -1
- package/src/contractSupport/statistics.d.ts +0 -7
- package/src/contractSupport/statistics.d.ts.map +0 -1
- package/src/contractSupport/topics.d.ts +0 -22
- package/src/contractSupport/topics.d.ts.map +0 -1
- package/src/contractSupport/types.d.ts +0 -63
- package/src/contractSupport/types.d.ts.map +0 -1
- package/src/contractSupport/zoeHelpers.d.ts +0 -30
- package/src/contractSupport/zoeHelpers.d.ts.map +0 -1
- package/src/contracts/atomicSwap.d.ts +0 -16
- package/src/contracts/atomicSwap.d.ts.map +0 -1
- package/src/contracts/auction/assertBidSeat.d.ts +0 -2
- package/src/contracts/auction/assertBidSeat.d.ts.map +0 -1
- package/src/contracts/auction/firstPriceLogic.d.ts +0 -2
- package/src/contracts/auction/firstPriceLogic.d.ts.map +0 -1
- package/src/contracts/auction/index.d.ts +0 -56
- package/src/contracts/auction/index.d.ts.map +0 -1
- package/src/contracts/auction/secondPriceLogic.d.ts +0 -2
- package/src/contracts/auction/secondPriceLogic.d.ts.map +0 -1
- package/src/contracts/automaticRefund.d.ts +0 -25
- package/src/contracts/automaticRefund.d.ts.map +0 -1
- package/src/contracts/autoswap.d.ts +0 -43
- package/src/contracts/autoswap.d.ts.map +0 -1
- package/src/contracts/barterExchange.d.ts +0 -22
- package/src/contracts/barterExchange.d.ts.map +0 -1
- package/src/contracts/callSpread/calculateShares.d.ts +0 -2
- package/src/contracts/callSpread/calculateShares.d.ts.map +0 -1
- package/src/contracts/callSpread/fundedCallSpread.d.ts +0 -60
- package/src/contracts/callSpread/fundedCallSpread.d.ts.map +0 -1
- package/src/contracts/callSpread/payoffHandler.d.ts +0 -11
- package/src/contracts/callSpread/payoffHandler.d.ts.map +0 -1
- package/src/contracts/callSpread/percent.d.ts +0 -3
- package/src/contracts/callSpread/percent.d.ts.map +0 -1
- package/src/contracts/callSpread/position.d.ts +0 -10
- package/src/contracts/callSpread/position.d.ts.map +0 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +0 -66
- package/src/contracts/callSpread/pricedCallSpread.d.ts.map +0 -1
- package/src/contracts/callSpread/types.d.ts +0 -30
- package/src/contracts/callSpread/types.d.ts.map +0 -1
- package/src/contracts/coveredCall-durable.d.ts +0 -23
- package/src/contracts/coveredCall-durable.d.ts.map +0 -1
- package/src/contracts/coveredCall.d.ts +0 -64
- package/src/contracts/coveredCall.d.ts.map +0 -1
- package/src/contracts/exported.d.ts +0 -2
- package/src/contracts/exported.d.ts.map +0 -1
- package/src/contracts/loan/addCollateral.d.ts +0 -3
- package/src/contracts/loan/addCollateral.d.ts.map +0 -1
- package/src/contracts/loan/borrow.d.ts +0 -3
- package/src/contracts/loan/borrow.d.ts.map +0 -1
- package/src/contracts/loan/close.d.ts +0 -3
- package/src/contracts/loan/close.d.ts.map +0 -1
- package/src/contracts/loan/index.d.ts +0 -64
- package/src/contracts/loan/index.d.ts.map +0 -1
- package/src/contracts/loan/lend.d.ts +0 -3
- package/src/contracts/loan/lend.d.ts.map +0 -1
- package/src/contracts/loan/liquidate.d.ts +0 -3
- package/src/contracts/loan/liquidate.d.ts.map +0 -1
- package/src/contracts/loan/scheduleLiquidation.d.ts +0 -3
- package/src/contracts/loan/scheduleLiquidation.d.ts.map +0 -1
- package/src/contracts/loan/types.d.ts +0 -161
- package/src/contracts/loan/types.d.ts.map +0 -1
- package/src/contracts/loan/updateDebt.d.ts +0 -11
- package/src/contracts/loan/updateDebt.d.ts.map +0 -1
- package/src/contracts/mintAndSellNFT.d.ts +0 -28
- package/src/contracts/mintAndSellNFT.d.ts.map +0 -1
- package/src/contracts/mintPayments.d.ts +0 -30
- package/src/contracts/mintPayments.d.ts.map +0 -1
- package/src/contracts/oracle.d.ts +0 -26
- package/src/contracts/oracle.d.ts.map +0 -1
- package/src/contracts/otcDesk.d.ts +0 -79
- package/src/contracts/otcDesk.d.ts.map +0 -1
- package/src/contracts/priceAggregator.d.ts +0 -91
- package/src/contracts/priceAggregator.d.ts.map +0 -1
- package/src/contracts/priceAggregatorTypes.d.ts +0 -77
- package/src/contracts/priceAggregatorTypes.d.ts.map +0 -1
- package/src/contracts/scaledPriceAuthority.d.ts +0 -23
- package/src/contracts/scaledPriceAuthority.d.ts.map +0 -1
- package/src/contracts/sellItems.d.ts +0 -30
- package/src/contracts/sellItems.d.ts.map +0 -1
- package/src/contracts/simpleExchange.d.ts +0 -37
- package/src/contracts/simpleExchange.d.ts.map +0 -1
- package/src/contracts/types.d.ts +0 -80
- package/src/contracts/types.d.ts.map +0 -1
- package/src/handleWarning.d.ts +0 -3
- package/src/handleWarning.d.ts.map +0 -1
- package/src/instanceRecordStorage.d.ts +0 -2
- package/src/instanceRecordStorage.d.ts.map +0 -1
- package/src/internal-types.d.ts +0 -177
- package/src/internal-types.d.ts.map +0 -1
- package/src/issuerRecord.d.ts +0 -3
- package/src/issuerRecord.d.ts.map +0 -1
- package/src/issuerStorage.d.ts +0 -14
- package/src/issuerStorage.d.ts.map +0 -1
- package/src/makeHandle.d.ts +0 -4
- package/src/makeHandle.d.ts.map +0 -1
- package/src/objArrayConversion.d.ts +0 -5
- package/src/objArrayConversion.d.ts.map +0 -1
- package/src/typeGuards.d.ts +0 -168
- package/src/typeGuards.d.ts.map +0 -1
- package/src/types.d.ts +0 -45
- package/src/types.d.ts.map +0 -1
- package/src/zoeService/createZCFVat.d.ts +0 -2
- package/src/zoeService/createZCFVat.d.ts.map +0 -1
- package/src/zoeService/escrowStorage.d.ts +0 -7
- package/src/zoeService/escrowStorage.d.ts.map +0 -1
- package/src/zoeService/feeMint.d.ts +0 -30
- package/src/zoeService/feeMint.d.ts.map +0 -1
- package/src/zoeService/installationStorage.d.ts +0 -35
- package/src/zoeService/installationStorage.d.ts.map +0 -1
- package/src/zoeService/instanceAdminStorage.d.ts +0 -123
- package/src/zoeService/instanceAdminStorage.d.ts.map +0 -1
- package/src/zoeService/internal-types.d.ts +0 -90
- package/src/zoeService/internal-types.d.ts.map +0 -1
- package/src/zoeService/invitationQueries.d.ts +0 -6
- package/src/zoeService/invitationQueries.d.ts.map +0 -1
- package/src/zoeService/makeInvitation.d.ts +0 -5
- package/src/zoeService/makeInvitation.d.ts.map +0 -1
- package/src/zoeService/offer/burnInvitation.d.ts +0 -5
- package/src/zoeService/offer/burnInvitation.d.ts.map +0 -1
- package/src/zoeService/offer/offer.d.ts +0 -2
- package/src/zoeService/offer/offer.d.ts.map +0 -1
- package/src/zoeService/startInstance.d.ts +0 -4
- package/src/zoeService/startInstance.d.ts.map +0 -1
- package/src/zoeService/types.d.ts +0 -226
- package/src/zoeService/types.d.ts.map +0 -1
- package/src/zoeService/zoe.d.ts +0 -61
- package/src/zoeService/zoe.d.ts.map +0 -1
- package/src/zoeService/zoeSeat.d.ts +0 -56
- package/src/zoeService/zoeSeat.d.ts.map +0 -1
- package/src/zoeService/zoeStorageManager.d.ts +0 -75
- package/src/zoeService/zoeStorageManager.d.ts.map +0 -1
- package/tools/fakePriceAuthority.d.ts +0 -30
- package/tools/fakePriceAuthority.d.ts.map +0 -1
- package/tools/fakeVatAdmin.d.ts +0 -103
- package/tools/fakeVatAdmin.d.ts.map +0 -1
- package/tools/internal-types.d.ts +0 -12
- package/tools/internal-types.d.ts.map +0 -1
- package/tools/manualPriceAuthority.d.ts +0 -20
- package/tools/manualPriceAuthority.d.ts.map +0 -1
- package/tools/manualTimer.d.ts +0 -44
- package/tools/manualTimer.d.ts.map +0 -1
- package/tools/prepare-test-env-ava.d.ts +0 -2
- package/tools/prepare-test-env-ava.d.ts.map +0 -1
- package/tools/prepare-test-env.d.ts +0 -2
- package/tools/prepare-test-env.d.ts.map +0 -1
- package/tools/priceAuthorityRegistry.d.ts +0 -20
- package/tools/priceAuthorityRegistry.d.ts.map +0 -1
- package/tools/scriptedOracle.d.ts +0 -27
- package/tools/scriptedOracle.d.ts.map +0 -1
- package/tools/scriptedPriceAuthority.d.ts +0 -2
- package/tools/scriptedPriceAuthority.d.ts.map +0 -1
- package/tools/setup-zoe.d.ts +0 -35
- package/tools/setup-zoe.d.ts.map +0 -1
- package/tools/types-ambient.d.ts +0 -142
- package/tools/types-ambient.d.ts.map +0 -1
- package/tools/types.d.ts +0 -142
- package/tools/types.d.ts.map +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapForID: GetBundleCapForID, shutdownZoeVat: ShutdownWithFailure, feeMint: {
|
|
2
|
-
getFeeIssuerKit: GetFeeIssuerKit;
|
|
3
|
-
getFeeIssuer: () => Issuer;
|
|
4
|
-
getFeeBrand: () => Brand;
|
|
5
|
-
}, zoeBaggage: MapStore<string, any>): {
|
|
6
|
-
zoeServiceDataAccess: {
|
|
7
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
8
|
-
getBundleIDFromInstallation(allegedInstallation: any): any;
|
|
9
|
-
getPublicFacet(instance: any): any;
|
|
10
|
-
getBrands(instance: any): any;
|
|
11
|
-
getIssuers(instance: any): any;
|
|
12
|
-
getOfferFilter(instance: any): any;
|
|
13
|
-
getTerms(instance: any): any;
|
|
14
|
-
getInstallation(instance: any): any;
|
|
15
|
-
getProposalShapeForInvitation: (invitationHandle: any) => any;
|
|
16
|
-
installBundle: (allegedBundle: any, bundleLabel: any) => any;
|
|
17
|
-
installBundleID(bundleID: any, bundleLabel: any): Promise<Installation<any>>;
|
|
18
|
-
};
|
|
19
|
-
makeOfferAccess: {
|
|
20
|
-
getAssetKindByBrand: GetAssetKindByBrand;
|
|
21
|
-
getInstanceAdmin(instance: any): any;
|
|
22
|
-
getProposalShapeForInvitation: (invitationHandle: any) => any;
|
|
23
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
24
|
-
depositPayments(proposal: any, payments: any): Promise<AmountKeywordRecord>;
|
|
25
|
-
};
|
|
26
|
-
startInstanceAccess: {
|
|
27
|
-
makeZoeInstanceStorageManager: MakeZoeInstanceStorageManager;
|
|
28
|
-
/** @type {UnwrapInstallation} */
|
|
29
|
-
unwrapInstallation(installationP: ERef<Installation<any>>): ERef<{
|
|
30
|
-
bundle?: SourceBundle | undefined;
|
|
31
|
-
bundleCap?: any;
|
|
32
|
-
bundleID?: string | undefined;
|
|
33
|
-
installation: Installation<any>;
|
|
34
|
-
}>;
|
|
35
|
-
};
|
|
36
|
-
invitationIssuerAccess: {
|
|
37
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
38
|
-
};
|
|
39
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
40
|
-
zoeServiceDataAccess: {
|
|
41
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
42
|
-
getBundleIDFromInstallation(allegedInstallation: any): any;
|
|
43
|
-
getPublicFacet(instance: any): any;
|
|
44
|
-
getBrands(instance: any): any;
|
|
45
|
-
getIssuers(instance: any): any;
|
|
46
|
-
getOfferFilter(instance: any): any;
|
|
47
|
-
getTerms(instance: any): any;
|
|
48
|
-
getInstallation(instance: any): any;
|
|
49
|
-
getProposalShapeForInvitation: (invitationHandle: any) => any;
|
|
50
|
-
installBundle: (allegedBundle: any, bundleLabel: any) => any;
|
|
51
|
-
installBundleID(bundleID: any, bundleLabel: any): Promise<Installation<any>>;
|
|
52
|
-
};
|
|
53
|
-
makeOfferAccess: {
|
|
54
|
-
getAssetKindByBrand: GetAssetKindByBrand;
|
|
55
|
-
getInstanceAdmin(instance: any): any;
|
|
56
|
-
getProposalShapeForInvitation: (invitationHandle: any) => any;
|
|
57
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
58
|
-
depositPayments(proposal: any, payments: any): Promise<AmountKeywordRecord>;
|
|
59
|
-
};
|
|
60
|
-
startInstanceAccess: {
|
|
61
|
-
makeZoeInstanceStorageManager: MakeZoeInstanceStorageManager;
|
|
62
|
-
/** @type {UnwrapInstallation} */
|
|
63
|
-
unwrapInstallation(installationP: ERef<Installation<any>>): ERef<{
|
|
64
|
-
bundle?: SourceBundle | undefined;
|
|
65
|
-
bundleCap?: any;
|
|
66
|
-
bundleID?: string | undefined;
|
|
67
|
-
installation: Installation<any>;
|
|
68
|
-
}>;
|
|
69
|
-
};
|
|
70
|
-
invitationIssuerAccess: {
|
|
71
|
-
getInvitationIssuer: () => Issuer<"set">;
|
|
72
|
-
};
|
|
73
|
-
}>;
|
|
74
|
-
export type Baggage = import('@agoric/vat-data').Baggage;
|
|
75
|
-
//# sourceMappingURL=zoeStorageManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AAwDO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACV,eAAoB,EAAE,eAAe,CAAC;IACtC,YAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,WAAgB,EAAE,MAAM,KAAK,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;QA+ZI,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAjC,iCAAiC;;;;;;;;;;;GAYxC;sBAjca,OAAO,kBAAkB,EAAE,OAAO"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {object} FakePriceAuthorityOptions
|
|
3
|
-
* @property {Brand<'nat'>} actualBrandIn
|
|
4
|
-
* @property {Brand<'nat'>} actualBrandOut
|
|
5
|
-
* @property {Array<number>} [priceList]
|
|
6
|
-
* @property {Array<[number, number]>} [tradeList]
|
|
7
|
-
* @property {ERef<import('@agoric/time/src/types').TimerService>} timer
|
|
8
|
-
* @property {import('@agoric/time/src/types').RelativeTime} [quoteInterval]
|
|
9
|
-
* @property {ERef<Mint<'set'>>} [quoteMint]
|
|
10
|
-
* @property {Amount<'nat'>} [unitAmountIn]
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* TODO: multiple price Schedules for different goods, or for moving the price
|
|
14
|
-
* in different directions?
|
|
15
|
-
*
|
|
16
|
-
* @param {FakePriceAuthorityOptions} options
|
|
17
|
-
* @returns {Promise<PriceAuthority>}
|
|
18
|
-
*/
|
|
19
|
-
export function makeFakePriceAuthority(options: FakePriceAuthorityOptions): Promise<PriceAuthority>;
|
|
20
|
-
export type FakePriceAuthorityOptions = {
|
|
21
|
-
actualBrandIn: Brand<'nat'>;
|
|
22
|
-
actualBrandOut: Brand<'nat'>;
|
|
23
|
-
priceList?: number[] | undefined;
|
|
24
|
-
tradeList?: [number, number][] | undefined;
|
|
25
|
-
timer: ERef<import('@agoric/time/src/types').TimerService>;
|
|
26
|
-
quoteInterval?: import("@agoric/time/src/types").RelativeTime | undefined;
|
|
27
|
-
quoteMint?: ERef<Mint<"set">> | undefined;
|
|
28
|
-
unitAmountIn?: Amount<"nat"> | undefined;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=fakePriceAuthority.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakePriceAuthority.d.ts","sourceRoot":"","sources":["fakePriceAuthority.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,gDAHW,yBAAyB,GACvB,QAAQ,cAAc,CAAC,CAoSnC;;mBAnTa,MAAM,KAAK,CAAC;oBACZ,MAAM,KAAK,CAAC;;;WAGZ,KAAK,OAAO,wBAAwB,EAAE,YAAY,CAAC"}
|
package/tools/fakeVatAdmin.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
export const zcfBundleCap: any;
|
|
2
|
-
export default fakeVatAdmin;
|
|
3
|
-
export type BundleID = import('@agoric/swingset-vat').BundleID;
|
|
4
|
-
export type EndoZipBase64Bundle = import('@agoric/swingset-vat').EndoZipBase64Bundle;
|
|
5
|
-
export type BundleCap = import('@agoric/swingset-vat').BundleCap;
|
|
6
|
-
declare const fakeVatAdmin: {
|
|
7
|
-
getBundleCap: (bundleID: any) => Promise<any>;
|
|
8
|
-
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
9
|
-
getNamedBundleCap: (name: any) => Promise<any>;
|
|
10
|
-
getBundleIDByName: (name: any) => Promise<string>;
|
|
11
|
-
createVat: (bundleCap: any, { vatParameters }?: {
|
|
12
|
-
vatParameters?: {} | undefined;
|
|
13
|
-
}) => Promise<{
|
|
14
|
-
root: unknown;
|
|
15
|
-
adminNode: {
|
|
16
|
-
done: () => Promise<any>;
|
|
17
|
-
terminateWithFailure: () => void;
|
|
18
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
19
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
20
|
-
done: () => Promise<any>;
|
|
21
|
-
terminateWithFailure: () => void;
|
|
22
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
23
|
-
}>;
|
|
24
|
-
}>;
|
|
25
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
26
|
-
getBundleCap: (bundleID: any) => Promise<any>;
|
|
27
|
-
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
28
|
-
getNamedBundleCap: (name: any) => Promise<any>;
|
|
29
|
-
getBundleIDByName: (name: any) => Promise<string>;
|
|
30
|
-
createVat: (bundleCap: any, { vatParameters }?: {
|
|
31
|
-
vatParameters?: {} | undefined;
|
|
32
|
-
}) => Promise<{
|
|
33
|
-
root: unknown;
|
|
34
|
-
adminNode: {
|
|
35
|
-
done: () => Promise<any>;
|
|
36
|
-
terminateWithFailure: () => void;
|
|
37
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
38
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
39
|
-
done: () => Promise<any>;
|
|
40
|
-
terminateWithFailure: () => void;
|
|
41
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
42
|
-
}>;
|
|
43
|
-
}>;
|
|
44
|
-
}>;
|
|
45
|
-
/**
|
|
46
|
-
* @param {(...args) => unknown} [testContextSetter]
|
|
47
|
-
* @param {(x: unknown) => unknown} [makeRemote]
|
|
48
|
-
*/
|
|
49
|
-
export function makeFakeVatAdmin(testContextSetter?: ((...args: any[]) => unknown) | undefined, makeRemote?: ((x: unknown) => unknown) | undefined): {
|
|
50
|
-
admin: {
|
|
51
|
-
getBundleCap: (bundleID: any) => Promise<any>;
|
|
52
|
-
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
53
|
-
getNamedBundleCap: (name: any) => Promise<any>;
|
|
54
|
-
getBundleIDByName: (name: any) => Promise<string>;
|
|
55
|
-
createVat: (bundleCap: any, { vatParameters }?: {
|
|
56
|
-
vatParameters?: {} | undefined;
|
|
57
|
-
}) => Promise<{
|
|
58
|
-
root: unknown;
|
|
59
|
-
adminNode: {
|
|
60
|
-
done: () => Promise<any>;
|
|
61
|
-
terminateWithFailure: () => void;
|
|
62
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
63
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
64
|
-
done: () => Promise<any>;
|
|
65
|
-
terminateWithFailure: () => void;
|
|
66
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
67
|
-
}>;
|
|
68
|
-
}>;
|
|
69
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
70
|
-
getBundleCap: (bundleID: any) => Promise<any>;
|
|
71
|
-
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
72
|
-
getNamedBundleCap: (name: any) => Promise<any>;
|
|
73
|
-
getBundleIDByName: (name: any) => Promise<string>;
|
|
74
|
-
createVat: (bundleCap: any, { vatParameters }?: {
|
|
75
|
-
vatParameters?: {} | undefined;
|
|
76
|
-
}) => Promise<{
|
|
77
|
-
root: unknown;
|
|
78
|
-
adminNode: {
|
|
79
|
-
done: () => Promise<any>;
|
|
80
|
-
terminateWithFailure: () => void;
|
|
81
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
82
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
83
|
-
done: () => Promise<any>;
|
|
84
|
-
terminateWithFailure: () => void;
|
|
85
|
-
upgrade: (_bundleCap: any, _options: any) => never;
|
|
86
|
-
}>;
|
|
87
|
-
}>;
|
|
88
|
-
}>;
|
|
89
|
-
vatAdminState: {
|
|
90
|
-
getExitMessage: () => any;
|
|
91
|
-
getHasExited: () => boolean;
|
|
92
|
-
getExitWithFailure: () => any;
|
|
93
|
-
installBundle: (id: any, bundle: any) => any;
|
|
94
|
-
installNamedBundle: (name: any, id: any, bundle: any) => any;
|
|
95
|
-
getCriticalVatKey: () => {};
|
|
96
|
-
getVatPowers: () => {
|
|
97
|
-
D: (bcap: any) => {
|
|
98
|
-
getBundle: () => import("@agoric/swingset-vat").EndoZipBase64Bundle;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=fakeVatAdmin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AAsBA,+BAA4C;;uBAR7B,OAAO,sBAAsB,EAAE,QAAQ;kCACvC,OAAO,sBAAsB,EAAE,mBAAmB;wBAGlD,OAAO,sBAAsB,EAAE,SAAS;AAmJvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8C;AA7I9C;;;GAGG;AACH,0EAHwB,OAAO,iCAChB,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoIjC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type ManualTimerAdmin = {
|
|
2
|
-
/**
|
|
3
|
-
* Advance the timer by one tick.
|
|
4
|
-
* DEPRECATED: use `await tickN(1)` instead. `tick` function errors might be
|
|
5
|
-
* thrown synchronously, even though success is signaled by returning anything
|
|
6
|
-
* other than a rejected promise.
|
|
7
|
-
*/
|
|
8
|
-
tick: (msg?: string) => void | Promise<void>;
|
|
9
|
-
tickN: (nTimes: number, msg?: string) => Promise<void>;
|
|
10
|
-
};
|
|
11
|
-
type ManualTimer = import('@agoric/time/src/types').TimerService & ManualTimerAdmin;
|
|
12
|
-
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;;;;;iBAIqB,MAAM,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;oBAI7B,MAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI,CAAC;;mBAIhD,OAAO,wBAAwB,EAAE,YAAY,GAAG,gBAAgB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {object} options
|
|
3
|
-
* @param {Brand<'nat'>} options.actualBrandIn
|
|
4
|
-
* @param {Brand<'nat'>} options.actualBrandOut
|
|
5
|
-
* @param {Ratio} options.initialPrice
|
|
6
|
-
* @param {import('@agoric/time/src/types').TimerService} options.timer
|
|
7
|
-
* @param {IssuerKit<'set'>} [options.quoteIssuerKit]
|
|
8
|
-
* @returns {PriceAuthority & { setPrice: (Ratio) => void }}
|
|
9
|
-
*/
|
|
10
|
-
export function makeManualPriceAuthority(options: {
|
|
11
|
-
actualBrandIn: Brand<'nat'>;
|
|
12
|
-
actualBrandOut: Brand<'nat'>;
|
|
13
|
-
initialPrice: Ratio;
|
|
14
|
-
timer: import('@agoric/time/src/types').TimerService;
|
|
15
|
-
quoteIssuerKit?: IssuerKit<"set"> | undefined;
|
|
16
|
-
}): PriceAuthority & {
|
|
17
|
-
setPrice: (Ratio: any) => void;
|
|
18
|
-
};
|
|
19
|
-
export type ManualPriceAuthority = ReturnType<typeof makeManualPriceAuthority>;
|
|
20
|
-
//# sourceMappingURL=manualPriceAuthority.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH;IAPiC,aAAa,EAAnC,MAAM,KAAK,CAAC;IACU,cAAc,EAApC,MAAM,KAAK,CAAC;IACG,YAAY,EAA3B,KAAK;IACkD,KAAK,EAA5D,OAAO,wBAAwB,EAAE,YAAY;IAClB,cAAc;;8BACC,IAAI;EAsExD;mCACa,WAAW,+BAA+B,CAAC"}
|
package/tools/manualTimer.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export default buildManualTimer;
|
|
2
|
-
export type ZoeManualTimerOptions = {
|
|
3
|
-
timeStep?: import('@agoric/time/src/types').RelativeTime | bigint;
|
|
4
|
-
eventLoopIteration?: () => Promise<void>;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* A fake TimerService, for unit tests that do not use a real
|
|
8
|
-
* kernel. You can make time pass by calling `advanceTo(when)`, or one
|
|
9
|
-
* `timeStep` at a time by calling `tick()`.
|
|
10
|
-
*
|
|
11
|
-
* `advanceTo()` merely schedules a wakeup: the actual
|
|
12
|
-
* handlers (in the code under test) are invoked several turns
|
|
13
|
-
* later. Some zoe/etc tests want to poll for the consequences of
|
|
14
|
-
* those invocations. The best approach is to get an appropriate
|
|
15
|
-
* Promise from your code-under-test, wait for it to fire, and then
|
|
16
|
-
* poll. But some libraries do not offer this convenience, especially
|
|
17
|
-
* when they use internal "fire and forget" actions.
|
|
18
|
-
*
|
|
19
|
-
* To support those tests, the manual timer accepts a
|
|
20
|
-
* `eventLoopIteration` option. If provided, each call to `tick()`
|
|
21
|
-
* will wait for all triggered activity to complete before
|
|
22
|
-
* returning. That doesn't mean the `wake()` handler's result promise
|
|
23
|
-
* has fired; it just means there are no settled Promises still trying
|
|
24
|
-
* to execute their callbacks.
|
|
25
|
-
*
|
|
26
|
-
* The following will wait for all such Promise activity to finish
|
|
27
|
-
* before returning from `tick()`:
|
|
28
|
-
*
|
|
29
|
-
* eventLoopIteration = () => new Promise(setImmediate);
|
|
30
|
-
* mt = buildManualTimer(log, startTime, { eventLoopIteration })
|
|
31
|
-
*
|
|
32
|
-
* `tickN(count)` calls `tick()` multiple times, awaiting each one
|
|
33
|
-
*
|
|
34
|
-
* The first argument is called to log 'tick' events, which might help
|
|
35
|
-
* with "golden transcript" -style tests to distinguish tick
|
|
36
|
-
* boundaries
|
|
37
|
-
*
|
|
38
|
-
* @param {(...args: any[]) => void} [log]
|
|
39
|
-
* @param {import('@agoric/time/src/types').Timestamp | bigint} [startValue=0n]
|
|
40
|
-
* @param {ZoeManualTimerOptions} [options]
|
|
41
|
-
* @returns {ManualTimer}
|
|
42
|
-
*/
|
|
43
|
-
declare function buildManualTimer(log?: ((...args: any[]) => void) | undefined, startValue?: import("@agoric/time/src/types").Timestamp | undefined, options?: ZoeManualTimerOptions | undefined): ManualTimer;
|
|
44
|
-
//# sourceMappingURL=manualTimer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manualTimer.d.ts","sourceRoot":"","sources":["manualTimer.js"],"names":[],"mappings":";oCAca;IACZ,QAAW,CAAC,EAAE,OAAO,wBAAwB,EAAE,YAAY,GAAG,MAAM,CAAC;IACrE,kBAAqB,CAAC,EAAE,MAAM,QAAQ,IAAI,CAAC,CAAC;CACzC;AAKJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,mDANqB,GAAG,EAAE,KAAK,IAAI,kIAGtB,WAAW,CAuDvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-test-env-ava.d.ts","sourceRoot":"","sources":["prepare-test-env-ava.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-test-env.d.ts","sourceRoot":"","sources":["prepare-test-env.js"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function providePriceAuthorityRegistry(baggage: MapStore<string, any>): PriceAuthorityRegistry;
|
|
2
|
-
export type Deleter = {
|
|
3
|
-
delete: () => void;
|
|
4
|
-
};
|
|
5
|
-
export type PriceAuthorityRegistryAdmin = {
|
|
6
|
-
/**
|
|
7
|
-
* Add a unique price authority for a given pair
|
|
8
|
-
*/
|
|
9
|
-
registerPriceAuthority: (pa: ERef<PriceAuthority>, brandIn: Brand, brandOut: Brand, force?: boolean) => Promise<Deleter>;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* A price authority that is a facade
|
|
13
|
-
* for other backing price authorities registered for a given asset and price
|
|
14
|
-
* brand
|
|
15
|
-
*/
|
|
16
|
-
export type PriceAuthorityRegistry = {
|
|
17
|
-
priceAuthority: PriceAuthority;
|
|
18
|
-
adminFacet: PriceAuthorityRegistryAdmin;
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=priceAuthorityRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"priceAuthorityRegistry.d.ts","sourceRoot":"","sources":["priceAuthorityRegistry.js"],"names":[],"mappings":"AA0CO,+EAFM,sBAAsB,CAwKlC;;YAhMa,MAAM,IAAI;;;;;;iCAKL,KAAK,cAAc,CAAC,WACf,KAAK,YACJ,KAAK,UACP,OAAO,KAAK,QAAQ,OAAO,CAAC;;;;;;;;oBAQrC,cAAc;gBACd,2BAA2B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Start an instance of an Oracle that follows a script. The Oracle has access
|
|
3
|
-
* to a timer, and looks in the script for events indexed by the current time.
|
|
4
|
-
* It responds to onQuery() by reporting any current event. This is intended to
|
|
5
|
-
* be useful for tests.
|
|
6
|
-
* The queries return an object that has fields { event, time, query }. event is
|
|
7
|
-
* whatever was in the script indexed by the time. The query is returned in the
|
|
8
|
-
* result, but has no impact on the result. If the script has no entry for the
|
|
9
|
-
* time, the event is 'nothing to report'.
|
|
10
|
-
*
|
|
11
|
-
* @param {Record<string, any>} script
|
|
12
|
-
* @param {Installation<import('../src/contracts/oracle.js').OracleStart>} oracleInstallation
|
|
13
|
-
* @param {import('@agoric/time/src/types').TimerService} timer
|
|
14
|
-
* @param {ZoeService} zoe
|
|
15
|
-
* @param {Issuer} feeIssuer
|
|
16
|
-
*/
|
|
17
|
-
export function makeScriptedOracle(script: Record<string, any>, oracleInstallation: Installation<import('../src/contracts/oracle.js').OracleStart>, timer: import('@agoric/time/src/types').TimerService, zoe: ZoeService, feeIssuer: Issuer): Promise<{
|
|
18
|
-
publicFacet: {
|
|
19
|
-
query(query: OracleQuery): Promise<unknown>;
|
|
20
|
-
makeQueryInvitation(query: OracleQuery): Promise<Invitation<R, A>>;
|
|
21
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
22
|
-
query(query: OracleQuery): Promise<unknown>;
|
|
23
|
-
makeQueryInvitation(query: OracleQuery): Promise<Invitation<R, A>>;
|
|
24
|
-
}>;
|
|
25
|
-
creatorFacet: OracleCreatorFacet;
|
|
26
|
-
}>;
|
|
27
|
-
//# sourceMappingURL=scriptedOracle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedOracle.d.ts","sourceRoot":"","sources":["scriptedOracle.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,2CANW,OAAO,MAAM,EAAE,GAAG,CAAC,sBACnB,aAAa,OAAO,4BAA4B,EAAE,WAAW,CAAC,SAC9D,OAAO,wBAAwB,EAAE,YAAY,OAC7C,UAAU,aACV,MAAM;;;;;;;;;GAqChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedPriceAuthority.d.ts","sourceRoot":"","sources":["scriptedPriceAuthority.js"],"names":[],"mappings":"AAWA,yEAoFC"}
|
package/tools/setup-zoe.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export function makeZoeKitForTest(vatAdminSvc?: import("@agoric/swingset-vat").VatAdminSvc | undefined): {
|
|
2
|
-
zoeService: ZoeService;
|
|
3
|
-
zoeConfigFacet: {
|
|
4
|
-
updateZcfBundleId(bundleId: any): void;
|
|
5
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
6
|
-
updateZcfBundleId(bundleId: any): void;
|
|
7
|
-
}>;
|
|
8
|
-
feeMintAccess: FeeMintAccess;
|
|
9
|
-
setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
|
|
10
|
-
};
|
|
11
|
-
export function makeZoeForTest(vatAdminSvc?: import("@agoric/swingset-vat").VatAdminSvc | undefined): ZoeService;
|
|
12
|
-
export function setUpZoeForTest<T extends unknown = unknown>({ setJig, feeIssuerConfig, vatAdminSvc, useNearRemote, }?: {
|
|
13
|
-
setJig?: ((jig: T) => void) | undefined;
|
|
14
|
-
feeIssuerConfig?: FeeIssuerConfig | undefined;
|
|
15
|
-
vatAdminSvc?: import("@agoric/swingset-vat").VatAdminSvc | undefined;
|
|
16
|
-
useNearRemote?: boolean | undefined;
|
|
17
|
-
}): Promise<{
|
|
18
|
-
zoe: ZoeService;
|
|
19
|
-
feeMintAccessP: FeeMintAccess;
|
|
20
|
-
vatAdminSvc: import("@agoric/swingset-vat").VatAdminSvc;
|
|
21
|
-
vatAdminState: {
|
|
22
|
-
getExitMessage: () => any;
|
|
23
|
-
getHasExited: () => boolean;
|
|
24
|
-
getExitWithFailure: () => any;
|
|
25
|
-
installBundle: (id: any, bundle: any) => any;
|
|
26
|
-
installNamedBundle: (name: any, id: any, bundle: any) => any;
|
|
27
|
-
getCriticalVatKey: () => {};
|
|
28
|
-
getVatPowers: () => {
|
|
29
|
-
D: (bcap: any) => {
|
|
30
|
-
getBundle: () => import("@agoric/swingset-vat").EndoZipBase64Bundle;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
} | undefined;
|
|
34
|
-
}>;
|
|
35
|
-
//# sourceMappingURL=setup-zoe.d.ts.map
|
package/tools/setup-zoe.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-zoe.d.ts","sourceRoot":"","sources":["setup-zoe.js"],"names":[],"mappings":"AASO;;;;;;;;;EAKN;AAKM,iHACoC;AAYpC;IAL+B,MAAM,gBAArB,IAAI;IACU,eAAe;IACnB,WAAW;IACf,aAAa;;;;;;;;;;;;;;;;;;GA+BzC"}
|
package/tools/types-ambient.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
type PriceQuote = {
|
|
2
|
-
/**
|
|
3
|
-
* Amount whose value is a PriceQuoteValue
|
|
4
|
-
*/
|
|
5
|
-
quoteAmount: Amount<'set'>;
|
|
6
|
-
/**
|
|
7
|
-
* The `quoteAmount` wrapped as a payment
|
|
8
|
-
*/
|
|
9
|
-
quotePayment: ERef<Payment<'set'>>;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* A single-valued set of PriceDescriptions. This is the `value` in
|
|
13
|
-
* PriceQuote.quoteAmount (`{ brand, value: PriceQuoteValue }`).
|
|
14
|
-
*/
|
|
15
|
-
type PriceQuoteValue = [PriceDescription];
|
|
16
|
-
/**
|
|
17
|
-
* A description of a single quote
|
|
18
|
-
*/
|
|
19
|
-
type PriceDescription = {
|
|
20
|
-
/**
|
|
21
|
-
* The amount supplied to a trade
|
|
22
|
-
*/
|
|
23
|
-
amountIn: Amount<'nat'>;
|
|
24
|
-
/**
|
|
25
|
-
* The quoted result of trading `amountIn`
|
|
26
|
-
*/
|
|
27
|
-
amountOut: Amount<'nat'>;
|
|
28
|
-
/**
|
|
29
|
-
* The service that gave the `timestamp`
|
|
30
|
-
*/
|
|
31
|
-
timer: import('@agoric/time/src/types').TimerService;
|
|
32
|
-
/**
|
|
33
|
-
* A timestamp according to `timer` for the quote
|
|
34
|
-
*/
|
|
35
|
-
timestamp: import('@agoric/time/src/types').TimestampRecord;
|
|
36
|
-
/**
|
|
37
|
-
* Additional conditions for the quote
|
|
38
|
-
*/
|
|
39
|
-
conditions?: any;
|
|
40
|
-
};
|
|
41
|
-
type PriceQuoteCreate = (priceQuery: PriceQuery) => ERef<PriceQuote> | undefined;
|
|
42
|
-
type PriceQuoteTrigger = (createQuote: PriceQuoteCreate) => any;
|
|
43
|
-
type PriceAuthorityAdmin = {
|
|
44
|
-
fireTriggers: (createQuote: PriceQuoteCreate) => Promise<void>;
|
|
45
|
-
};
|
|
46
|
-
type PriceAuthorityKit = {
|
|
47
|
-
priceAuthority: PriceAuthority;
|
|
48
|
-
adminFacet: PriceAuthorityAdmin;
|
|
49
|
-
};
|
|
50
|
-
type MutableQuote = {
|
|
51
|
-
cancel: (reason?: any) => void;
|
|
52
|
-
updateLevel: (amountIn: Amount<'nat'>, amountOut: Amount<'nat'>) => void;
|
|
53
|
-
getPromise: () => ERef<PriceQuote>;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* An object that mints PriceQuotes and handles
|
|
57
|
-
* triggers and notifiers for changes in the price
|
|
58
|
-
*/
|
|
59
|
-
type PriceAuthority = {
|
|
60
|
-
/**
|
|
61
|
-
* Get the ERTP issuer of PriceQuotes for a given brandIn/brandOut pair
|
|
62
|
-
*/
|
|
63
|
-
getQuoteIssuer: (brandIn: Brand, brandOut: Brand) => ERef<Issuer<'set'>>;
|
|
64
|
-
/**
|
|
65
|
-
* Get the timer used in PriceQuotes for a given brandIn/brandOut pair
|
|
66
|
-
*/
|
|
67
|
-
getTimerService: (brandIn: Brand, brandOut: Brand) => ERef<import('@agoric/time/src/types').TimerService>;
|
|
68
|
-
/**
|
|
69
|
-
* Be notified of the latest PriceQuotes for a given
|
|
70
|
-
* `amountIn`. The rate at which these are issued may be very different between
|
|
71
|
-
* `priceAuthorities`.
|
|
72
|
-
*/
|
|
73
|
-
makeQuoteNotifier: (amountIn: Amount<'nat'>, brandOut: Brand<'nat'>) => ERef<Notifier<PriceQuote>>;
|
|
74
|
-
/**
|
|
75
|
-
* Resolves after `deadline` passes on the
|
|
76
|
-
* priceAuthority's timerService with the price quote of `amountIn` at that time
|
|
77
|
-
*/
|
|
78
|
-
quoteAtTime: (deadline: import('@agoric/time/src/types').Timestamp, amountIn: Amount<'nat'>, brandOut: Brand<'nat'>) => Promise<PriceQuote>;
|
|
79
|
-
/**
|
|
80
|
-
* Get a quote corresponding to the specified amountIn
|
|
81
|
-
*/
|
|
82
|
-
quoteGiven: (amountIn: Amount<'nat'>, brandOut: Brand<'nat'>) => Promise<PriceQuote>;
|
|
83
|
-
/**
|
|
84
|
-
* Get a quote corresponding to the specified amountOut
|
|
85
|
-
*/
|
|
86
|
-
quoteWanted: (brandIn: Brand<'nat'>, amountOut: Amount<'nat'>) => Promise<PriceQuote>;
|
|
87
|
-
/**
|
|
88
|
-
* Resolve when a price quote of `amountIn` exceeds `amountOutLimit`
|
|
89
|
-
*/
|
|
90
|
-
quoteWhenGT: (amountIn: Amount<'nat'>, amountOutLimit: Amount<'nat'>) => Promise<PriceQuote>;
|
|
91
|
-
/**
|
|
92
|
-
* Resolve when a price quote of `amountIn` reaches or exceeds `amountOutLimit`
|
|
93
|
-
*/
|
|
94
|
-
quoteWhenGTE: (amountIn: Amount<'nat'>, amountOutLimit: Amount<'nat'>) => Promise<PriceQuote>;
|
|
95
|
-
/**
|
|
96
|
-
* Resolve when a price quote of `amountIn` reaches or drops below
|
|
97
|
-
* `amountOutLimit`
|
|
98
|
-
*/
|
|
99
|
-
quoteWhenLTE: (amountIn: Amount, amountOutLimit: Amount) => Promise<PriceQuote>;
|
|
100
|
-
/**
|
|
101
|
-
* Resolve when the price quote of `amountIn` drops below `amountOutLimit`
|
|
102
|
-
*/
|
|
103
|
-
quoteWhenLT: (amountIn: Amount, amountOutLimit: Amount) => Promise<PriceQuote>;
|
|
104
|
-
/**
|
|
105
|
-
* Resolve when a price quote of `amountIn` exceeds `amountOutLimit`
|
|
106
|
-
*/
|
|
107
|
-
mutableQuoteWhenGT: (amountIn: Amount, amountOutLimit: Amount) => ERef<MutableQuote>;
|
|
108
|
-
/**
|
|
109
|
-
* Resolve when a price quote of `amountIn` reaches or exceeds
|
|
110
|
-
* `amountOutLimit`
|
|
111
|
-
*/
|
|
112
|
-
mutableQuoteWhenGTE: (amountIn: Amount, amountOutLimit: Amount) => ERef<MutableQuote>;
|
|
113
|
-
/**
|
|
114
|
-
* Resolve when a price quote of `amountIn` reaches or drops below
|
|
115
|
-
* `amountOutLimit`
|
|
116
|
-
*/
|
|
117
|
-
mutableQuoteWhenLTE: (amountIn: Amount, amountOutLimit: Amount) => ERef<MutableQuote>;
|
|
118
|
-
/**
|
|
119
|
-
* Resolve when the price quote of `amountIn` drops below `amountOutLimit`
|
|
120
|
-
*/
|
|
121
|
-
mutableQuoteWhenLT: (amountIn: Amount, amountOutLimit: Amount) => ERef<MutableQuote>;
|
|
122
|
-
};
|
|
123
|
-
type PriceCalculator = (amount: Amount<'nat'>) => Amount<'nat'>;
|
|
124
|
-
type PriceQuery = (calcAmountIn: PriceCalculator, calcAmountOut: PriceCalculator) => {
|
|
125
|
-
amountIn: Amount<'nat'>;
|
|
126
|
-
amountOut: Amount<'nat'>;
|
|
127
|
-
timestamp?: import('@agoric/time/src/types').TimestampRecord;
|
|
128
|
-
} | undefined;
|
|
129
|
-
/**
|
|
130
|
-
* A description of a single quote
|
|
131
|
-
*/
|
|
132
|
-
type PriceLevel = {
|
|
133
|
-
/**
|
|
134
|
-
* The amount supplied to a trade
|
|
135
|
-
*/
|
|
136
|
-
amountIn: Amount<'nat'>;
|
|
137
|
-
/**
|
|
138
|
-
* The quoted result of trading `amountIn`
|
|
139
|
-
*/
|
|
140
|
-
amountOut: Amount<'nat'>;
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=types-ambient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;iBAIc,OAAO,KAAK,CAAC;;;;kBAEb,KAAK,QAAQ,KAAK,CAAC,CAAC;;;;;;uBAKrB,CAAC,gBAAgB,CAAC;;;;;;;;cAQjB,OAAO,KAAK,CAAC;;;;eAEb,OAAO,KAAK,CAAC;;;;WAEb,OAAO,wBAAwB,EAAE,YAAY;;;;eAE7C,OAAO,wBAAwB,EAAE,eAAe;;;;iBAEhD,GAAG;;qCAMN,UAAU,KACR,KAAK,UAAU,CAAC,GAAG,SAAS;uCAK9B,gBAAgB;;gCAKC,gBAAgB,KAAK,QAAQ,IAAI,CAAC;;;oBAKhD,cAAc;gBACd,mBAAmB;;;sBAKT,GAAG,KAAK,IAAI;4BACX,OAAO,KAAK,CAAC,aAAa,OAAO,KAAK,CAAC,KAAK,IAAI;gBAC3D,MAAM,KAAK,UAAU,CAAC;;;;;;;;;;8BAQZ,KAAK,YAAY,KAAK,KAAK,KAAK,OAAO,KAAK,CAAC,CAAC;;;;+BAG9C,KAAK,YACJ,KAAK,KACtB,KAAK,OAAO,wBAAwB,EAAE,YAAY,CAAC;;;;;;kCAGlC,OAAO,KAAK,CAAC,YACb,MAAM,KAAK,CAAC,KAClB,KAAK,SAAS,UAAU,CAAC,CAAC;;;;;4BAKpB,OAAO,wBAAwB,EAAE,SAAS,YAC1C,OAAO,KAAK,CAAC,YACb,MAAM,KAAK,CAAC,KAC7B,QAAQ,UAAU,CAAC;;;;2BAIF,OAAO,KAAK,CAAC,YACb,MAAM,KAAK,CAAC,KAC7B,QAAQ,UAAU,CAAC;;;;2BAGH,MAAM,KAAK,CAAC,aACV,OAAO,KAAK,CAAC,KAAK,QAAQ,UAAU,CAAC;;;;4BAGtC,OAAO,KAAK,CAAC,kBACP,OAAO,KAAK,CAAC,KACpC,QAAQ,UAAU,CAAC;;;;6BAGF,OAAO,KAAK,CAAC,kBACP,OAAO,KAAK,CAAC,KACpC,QAAQ,UAAU,CAAC;;;;;6BAGF,MAAM,kBACA,MAAM,KAC7B,QAAQ,UAAU,CAAC;;;;4BAIF,MAAM,kBACA,MAAM,KAC7B,QAAQ,UAAU,CAAC;;;;mCAGF,MAAM,kBACA,MAAM,KAC7B,KAAK,YAAY,CAAC;;;;;oCAGD,MAAM,kBACA,MAAM,KAC7B,KAAK,YAAY,CAAC;;;;;oCAID,MAAM,kBACA,MAAM,KAC7B,KAAK,YAAY,CAAC;;;;mCAID,MAAM,kBACA,MAAM,KAC7B,KAAK,YAAY,CAAC;;gCAKJ,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;iCAK1C,eAAe,iBACf,eAAe,KACb;IAAE,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,KAAK,CAAC,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,wBAAwB,EAAE,eAAe,CAAA;CAAE,GAAG,SAAS;;;;;;;;cAO9H,OAAO,KAAK,CAAC;;;;eAEb,OAAO,KAAK,CAAC"}
|