@agoric/zoe 0.26.3-dev-d6fae11.0.d6fae11 → 0.26.3-dev-64cee5a.0.64cee5a
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 +238 -238
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +14 -14
- package/src/contractFacet/vatRoot.d.ts +4 -2
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/vatRoot.js +2 -1
- package/src/contractFacet/zcfMint.d.ts +2 -1
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +2 -1
- package/src/contractSupport/durability.d.ts +3 -2
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +3 -2
- package/src/contractSupport/prepare-ownable.d.ts +2 -1
- package/src/contractSupport/prepare-ownable.d.ts.map +1 -1
- package/src/contractSupport/prepare-ownable.js +5 -1
- package/src/contractSupport/priceAuthority.d.ts +2 -1
- package/src/contractSupport/priceAuthority.d.ts.map +1 -1
- package/src/contractSupport/priceAuthority.js +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.js +2 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts +3 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.js +4 -2
- package/src/contractSupport/priceQuote.d.ts +3 -2
- package/src/contractSupport/priceQuote.d.ts.map +1 -1
- package/src/contractSupport/priceQuote.js +2 -1
- package/src/contractSupport/recorder.d.ts +4 -3
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/recorder.js +4 -3
- package/src/contractSupport/topics.d.ts +3 -1
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/topics.js +3 -1
- package/src/contracts/auction/index.d.ts +10 -6
- package/src/contracts/auction/index.d.ts.map +1 -1
- package/src/contracts/auction/index.js +5 -1
- package/src/contracts/coveredCall-durable.d.ts +3 -2
- package/src/contracts/coveredCall-durable.d.ts.map +1 -1
- package/src/contracts/coveredCall-durable.js +5 -1
- package/src/contracts/loan/types-ambient.d.ts.map +1 -1
- package/src/contracts/loan/types-ambient.js +1 -0
- package/src/contracts/loan/updateDebt.d.ts +3 -0
- package/src/contracts/loan/updateDebt.d.ts.map +1 -1
- package/src/contracts/loan/updateDebt.js +5 -1
- package/src/contracts/mintAndSellNFT.d.ts +3 -0
- package/src/contracts/mintAndSellNFT.d.ts.map +1 -1
- package/src/contracts/mintAndSellNFT.js +5 -1
- package/src/contracts/otcDesk.d.ts +6 -2
- package/src/contracts/otcDesk.d.ts.map +1 -1
- package/src/contracts/otcDesk.js +5 -1
- package/src/contracts/priceAggregator.d.ts +11 -10
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +17 -13
- package/src/contracts/priceAggregatorTypes.d.ts +2 -1
- package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
- package/src/contracts/priceAggregatorTypes.js +5 -1
- package/src/contracts/scaledPriceAuthority.d.ts +2 -1
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +2 -1
- package/src/contracts/types-ambient.d.ts.map +1 -1
- package/src/contracts/types-ambient.js +1 -0
- package/src/issuerStorage.d.ts +2 -1
- package/src/issuerStorage.d.ts.map +1 -1
- package/src/issuerStorage.js +2 -1
- package/src/typeGuards.d.ts +8 -4
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +5 -3
- package/src/zoeService/escrowStorage.d.ts +2 -1
- package/src/zoeService/escrowStorage.d.ts.map +1 -1
- package/src/zoeService/escrowStorage.js +2 -1
- package/src/zoeService/instanceAdminStorage.d.ts +3 -2
- package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
- package/src/zoeService/instanceAdminStorage.js +5 -4
- package/src/zoeService/internal-types.d.ts +12 -8
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +12 -8
- package/src/zoeService/invitationQueries.d.ts +6 -3
- package/src/zoeService/invitationQueries.d.ts.map +1 -1
- package/src/zoeService/invitationQueries.js +9 -3
- package/src/zoeService/originalZoeSeat.d.ts +2 -1
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +5 -1
- package/src/zoeService/startInstance.d.ts +2 -1
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +8 -5
- package/src/zoeService/zoeSeat.d.ts +2 -1
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +5 -1
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/tools/fakePriceAuthority.d.ts +6 -4
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +9 -6
- package/tools/manualPriceAuthority.d.ts +4 -2
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +2 -1
- package/tools/manualTimer.d.ts +4 -2
- package/tools/manualTimer.d.ts.map +1 -1
- package/tools/manualTimer.js +4 -2
- package/tools/scriptedOracle.d.ts +7 -3
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +4 -2
- package/tools/scriptedPriceAuthority.d.ts +1 -0
- package/tools/scriptedPriceAuthority.d.ts.map +1 -1
- package/tools/scriptedPriceAuthority.js +2 -1
- package/tools/types.d.ts +9 -5
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +9 -5
|
@@ -51,7 +51,7 @@ type ZoeInstanceStorageManager = {
|
|
|
51
51
|
/**
|
|
52
52
|
* of CreateVatResults
|
|
53
53
|
*/
|
|
54
|
-
getAdminNode: () =>
|
|
54
|
+
getAdminNode: () => VatAdminFacet;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Create a storage manager for a particular contract instance. The
|
|
@@ -69,22 +69,22 @@ type ZoeStorageManager = {
|
|
|
69
69
|
installBundle: InstallBundle;
|
|
70
70
|
installBundleID: InstallBundleID;
|
|
71
71
|
getBundleIDFromInstallation: GetBundleIDFromInstallation;
|
|
72
|
-
getPublicFacet:
|
|
72
|
+
getPublicFacet: GetPublicFacet;
|
|
73
73
|
getBrands: GetBrands;
|
|
74
74
|
getIssuers: GetIssuers;
|
|
75
|
-
getTerms:
|
|
76
|
-
getOfferFilter: (instance:
|
|
77
|
-
setOfferFilter: (instance: Instance
|
|
78
|
-
getInstallationForInstance: (instance:
|
|
75
|
+
getTerms: GetTerms;
|
|
76
|
+
getOfferFilter: (instance: Instance<any>) => string[];
|
|
77
|
+
setOfferFilter: (instance: Instance<any>, strings: string[]) => any;
|
|
78
|
+
getInstallationForInstance: (instance: Instance<any>) => Promise<Installation>;
|
|
79
79
|
getInstanceAdmin: GetInstanceAdmin;
|
|
80
80
|
unwrapInstallation: UnwrapInstallation;
|
|
81
|
-
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) =>
|
|
81
|
+
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => Pattern | undefined;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* Use VatAdminSvc to create a new vat, but only with the code of the
|
|
85
85
|
* ZCF bundle
|
|
86
86
|
*/
|
|
87
|
-
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<
|
|
87
|
+
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<CreateVatResults>;
|
|
88
88
|
type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<"nat">;
|
|
89
89
|
import type { FeeMintAccess } from './types.js';
|
|
90
90
|
import type { GetBrands } from './types.js';
|
|
@@ -94,4 +94,8 @@ import type { InstallBundle } from './types.js';
|
|
|
94
94
|
import type { InstallBundleID } from './types.js';
|
|
95
95
|
import type { SourceBundle } from './types.js';
|
|
96
96
|
import type { InstanceRecord } from './utils.js';
|
|
97
|
+
import type { VatAdminFacet } from '@agoric/swingset-vat';
|
|
98
|
+
import type { GetPublicFacet } from './utils.js';
|
|
99
|
+
import type { GetTerms } from './utils.js';
|
|
100
|
+
import type { CreateVatResults } from '@agoric/swingset-vat';
|
|
97
101
|
//# 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":";;;4BAgBW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,aAAa;;;;;;;;oDAUtB,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;;mCAKjB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,cAAc;eACd,SAAS;gBACT,UAAU;cACV,QAAQ;oBACR,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;oBACrC,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG;gCACnD,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC;sBAClD,gBAAgB;wBAChB,kBAAkB;mCAClB,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,GAAG,SAAS;;;;;;wCAQ9D,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,gBAAgB,CAAC;uCAK3B,aAAa,KACX,SAAS,CAAC,KAAK,CAAC;mCA5JqG,YAAY;+BAAZ,YAAY;iDAAZ,YAAY;gCAAZ,YAAY;mCAAZ,YAAY;qCAAZ,YAAY;kCAAZ,YAAY;oCAC7G,YAAY;mCACb,sBAAsB;oCACrB,YAAY;8BAClB,YAAY;sCACJ,sBAAsB"}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @import {FeeMintAccess, GetBrands, GetBundleIDFromInstallation, GetIssuers, InstallBundle, InstallBundleID, SourceBundle} from './types.js';
|
|
6
6
|
* @import {InstanceRecord} from './utils.js';
|
|
7
|
+
* @import {VatAdminFacet} from '@agoric/swingset-vat';
|
|
8
|
+
* @import {GetPublicFacet} from './utils.js';
|
|
9
|
+
* @import {GetTerms} from './utils.js';
|
|
10
|
+
* @import {CreateVatResults} from '@agoric/swingset-vat';
|
|
7
11
|
*/
|
|
8
12
|
|
|
9
13
|
/**
|
|
@@ -95,7 +99,7 @@
|
|
|
95
99
|
* @property {ZoeInstanceAdminMakeInvitation} makeInvitation
|
|
96
100
|
* @property {() => Issuer} getInvitationIssuer
|
|
97
101
|
* @property {() => object} getRoot of CreateVatResults
|
|
98
|
-
* @property {() =>
|
|
102
|
+
* @property {() => VatAdminFacet} getAdminNode of CreateVatResults
|
|
99
103
|
*/
|
|
100
104
|
|
|
101
105
|
/**
|
|
@@ -129,16 +133,16 @@
|
|
|
129
133
|
* @property {InstallBundle} installBundle
|
|
130
134
|
* @property {InstallBundleID} installBundleID
|
|
131
135
|
* @property {GetBundleIDFromInstallation} getBundleIDFromInstallation
|
|
132
|
-
* @property {
|
|
136
|
+
* @property {GetPublicFacet} getPublicFacet
|
|
133
137
|
* @property {GetBrands} getBrands
|
|
134
138
|
* @property {GetIssuers} getIssuers
|
|
135
|
-
* @property {
|
|
136
|
-
* @property {(instance:
|
|
137
|
-
* @property {(instance: Instance
|
|
138
|
-
* @property {(instance:
|
|
139
|
+
* @property {GetTerms} getTerms
|
|
140
|
+
* @property {(instance: Instance<any>) => string[]} getOfferFilter
|
|
141
|
+
* @property {(instance: Instance<any>, strings: string[]) => any} setOfferFilter
|
|
142
|
+
* @property {(instance: Instance<any>) => Promise<Installation>} getInstallationForInstance
|
|
139
143
|
* @property {GetInstanceAdmin} getInstanceAdmin
|
|
140
144
|
* @property {UnwrapInstallation} unwrapInstallation
|
|
141
|
-
* @property {(invitationHandle: InvitationHandle) =>
|
|
145
|
+
* @property {(invitationHandle: InvitationHandle) => Pattern | undefined} getProposalShapeForInvitation
|
|
142
146
|
*/
|
|
143
147
|
|
|
144
148
|
/**
|
|
@@ -148,7 +152,7 @@
|
|
|
148
152
|
* @callback CreateZCFVat
|
|
149
153
|
* @param {BundleCap} contractBundleCap
|
|
150
154
|
* @param {string} contractLabel
|
|
151
|
-
* @returns {Promise<
|
|
155
|
+
* @returns {Promise<CreateVatResults>}
|
|
152
156
|
*/
|
|
153
157
|
|
|
154
158
|
/**
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export function makeInvitationQueryFns(invitationIssuer: any): {
|
|
2
|
-
getInstance:
|
|
3
|
-
getInstallation:
|
|
4
|
-
getInvitationDetails:
|
|
2
|
+
getInstance: GetInstance;
|
|
3
|
+
getInstallation: GetInstallation;
|
|
4
|
+
getInvitationDetails: GetInvitationDetails;
|
|
5
5
|
};
|
|
6
|
+
import type { GetInstance } from './types.ts';
|
|
7
|
+
import type { GetInstallation } from './types.ts';
|
|
8
|
+
import type { GetInvitationDetails } from './types.ts';
|
|
6
9
|
//# sourceMappingURL=invitationQueries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitationQueries.d.ts","sourceRoot":"","sources":["invitationQueries.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invitationQueries.d.ts","sourceRoot":"","sources":["invitationQueries.js"],"names":[],"mappings":"AAWO;;;;EA+BN;iCAnC6B,YAAY;qCACR,YAAY;0CAFP,YAAY"}
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
import { X, Fail, q, makeError, annotateError } from '@endo/errors';
|
|
4
4
|
import { E } from '@endo/eventual-send';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @import {GetInvitationDetails} from './types.ts';
|
|
8
|
+
* @import {GetInstance} from './types.ts';
|
|
9
|
+
* @import {GetInstallation} from './types.ts';
|
|
10
|
+
*/
|
|
11
|
+
|
|
6
12
|
export const makeInvitationQueryFns = invitationIssuer => {
|
|
7
|
-
/** @type {
|
|
13
|
+
/** @type {GetInvitationDetails} */
|
|
8
14
|
const getInvitationDetails = async invitationP => {
|
|
9
15
|
const onRejected = reason => {
|
|
10
16
|
const err = makeError(
|
|
@@ -21,11 +27,11 @@ export const makeInvitationQueryFns = invitationIssuer => {
|
|
|
21
27
|
return invAmount.value[0];
|
|
22
28
|
};
|
|
23
29
|
|
|
24
|
-
/** @type {
|
|
30
|
+
/** @type {GetInstance} */
|
|
25
31
|
const getInstance = invitation =>
|
|
26
32
|
E.get(getInvitationDetails(invitation)).instance;
|
|
27
33
|
|
|
28
|
-
/** @type {
|
|
34
|
+
/** @type {GetInstallation} */
|
|
29
35
|
const getInstallation = invitation =>
|
|
30
36
|
E.get(getInvitationDetails(invitation)).installation;
|
|
31
37
|
|
|
@@ -30,5 +30,6 @@ export namespace OriginalZoeSeatIKit {
|
|
|
30
30
|
}>;
|
|
31
31
|
export { ZoeUserSeatShape as userSeat };
|
|
32
32
|
}
|
|
33
|
-
export function declareOldZoeSeatAdminKind(baggage:
|
|
33
|
+
export function declareOldZoeSeatAdminKind(baggage: Baggage, makeDurablePublishKit: () => PublishKit<any>): void;
|
|
34
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
34
35
|
//# sourceMappingURL=originalZoeSeat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA+BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,yBACP,MAAM,UAAU,CAAC,GAAG,CAAC,QAoR/B;6BAlVyB,kBAAkB"}
|
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
PaymentPKeywordRecordShape,
|
|
15
15
|
} from '../typeGuards.js';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
19
|
+
*/
|
|
20
|
+
|
|
17
21
|
export const coreUserSeatMethods = harden({
|
|
18
22
|
getProposal: M.call().returns(M.promise()),
|
|
19
23
|
getPayouts: M.call().returns(M.promise()),
|
|
@@ -72,7 +76,7 @@ const assertHasNotExited = (c, msg) => {
|
|
|
72
76
|
* The zoeSeatAdmin is passed by Zoe to the ContractFacet (zcf), to allow zcf to
|
|
73
77
|
* query or update the allocation or exit the seat cleanly.
|
|
74
78
|
*
|
|
75
|
-
* @param {
|
|
79
|
+
* @param {Baggage} baggage
|
|
76
80
|
* @param {() => PublishKit<any>} makeDurablePublishKit
|
|
77
81
|
*/
|
|
78
82
|
export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export function makeStartInstance(startInstanceAccess: Pick<ZoeStorageManager, "makeZoeInstanceStorageManager" | "unwrapInstallation">, getZcfBundleCapP: () => ERef<BundleCap>, getBundleCapByIdNow: (id: string) => BundleCap, zoeBaggage: Baggage):
|
|
1
|
+
export function makeStartInstance(startInstanceAccess: Pick<ZoeStorageManager, "makeZoeInstanceStorageManager" | "unwrapInstallation">, getZcfBundleCapP: () => ERef<BundleCap>, getBundleCapByIdNow: (id: string) => BundleCap, zoeBaggage: Baggage): StartInstance;
|
|
2
2
|
import type { BundleCap } from '@agoric/swingset-vat';
|
|
3
3
|
import type { Baggage } from '@agoric/vat-data';
|
|
4
|
+
import type { StartInstance } from './utils.js';
|
|
4
5
|
//# sourceMappingURL=startInstance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAqCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,aAAa,CAqWzB;+BAhX2B,sBAAsB;6BAFxB,kBAAkB;mCAGZ,YAAY"}
|
|
@@ -23,6 +23,9 @@ import {
|
|
|
23
23
|
* @import {Baggage} from '@agoric/vat-data';
|
|
24
24
|
* @import {WeakMapStore} from '@agoric/store';
|
|
25
25
|
* @import {BundleCap} from '@agoric/swingset-vat';
|
|
26
|
+
* @import {StartInstance} from './utils.js';
|
|
27
|
+
* @import {PromiseWatcher} from '@agoric/swingset-liveslots';
|
|
28
|
+
* @import {VatAdminFacet} from '@agoric/swingset-vat';
|
|
26
29
|
*/
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -30,7 +33,7 @@ import {
|
|
|
30
33
|
* @param {() => ERef<BundleCap>} getZcfBundleCapP
|
|
31
34
|
* @param {(id: string) => BundleCap} getBundleCapByIdNow
|
|
32
35
|
* @param {Baggage} zoeBaggage
|
|
33
|
-
* @returns {
|
|
36
|
+
* @returns {StartInstance}
|
|
34
37
|
*/
|
|
35
38
|
export const makeStartInstance = (
|
|
36
39
|
startInstanceAccess,
|
|
@@ -64,7 +67,7 @@ export const makeStartInstance = (
|
|
|
64
67
|
adminNode: M.remotable('adminNode'),
|
|
65
68
|
});
|
|
66
69
|
|
|
67
|
-
/** @type {
|
|
70
|
+
/** @type {PromiseWatcher<Completion, [InstanceAdmin, Handle<'adminNode'>]>} */
|
|
68
71
|
const watcher = prepareExo(
|
|
69
72
|
zoeBaggage,
|
|
70
73
|
'InstanceCompletionWatcher',
|
|
@@ -107,7 +110,7 @@ export const makeStartInstance = (
|
|
|
107
110
|
* @param {ZoeInstanceStorageManager} instanceStorage
|
|
108
111
|
* @param {InstanceAdmin} instanceAdmin
|
|
109
112
|
* @param {WeakMapStore<SeatHandle, ZoeSeatAdmin>} seatHandleToSeatAdmin
|
|
110
|
-
* @param {
|
|
113
|
+
* @param {VatAdminFacet} adminNode
|
|
111
114
|
*/
|
|
112
115
|
(instanceStorage, instanceAdmin, seatHandleToSeatAdmin, adminNode) => ({
|
|
113
116
|
instanceStorage,
|
|
@@ -229,7 +232,7 @@ export const makeStartInstance = (
|
|
|
229
232
|
AdminFacetI,
|
|
230
233
|
/**
|
|
231
234
|
*
|
|
232
|
-
* @param {
|
|
235
|
+
* @param {VatAdminFacet} adminNode
|
|
233
236
|
* @param {*} contractBundleCap
|
|
234
237
|
*/
|
|
235
238
|
(adminNode, contractBundleCap) => ({
|
|
@@ -277,7 +280,7 @@ export const makeStartInstance = (
|
|
|
277
280
|
);
|
|
278
281
|
|
|
279
282
|
/**
|
|
280
|
-
* @type {
|
|
283
|
+
* @type {StartInstance}
|
|
281
284
|
*/
|
|
282
285
|
const startInstance = async (
|
|
283
286
|
installationP,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeZoeSeatAdminFactory(baggage:
|
|
1
|
+
export function makeZoeSeatAdminFactory(baggage: Baggage): (initialAllocation: Allocation, proposal: ProposalRecord, instanceAdminHelper: InstanceAdminHelper, withdrawFacet: WithdrawFacet, exitObj?: ERef<ExitObj>, offerResultIsUndefined?: boolean) => {
|
|
2
2
|
userSeat: import("@endo/exo").Guarded<{
|
|
3
3
|
getProposal(): Promise<any>;
|
|
4
4
|
getPayouts(): Promise<any>;
|
|
@@ -20,4 +20,5 @@ export function makeZoeSeatAdminFactory(baggage: import("@agoric/vat-data").Bagg
|
|
|
20
20
|
finalPayouts(payments: any): Promise<void>;
|
|
21
21
|
}>;
|
|
22
22
|
};
|
|
23
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
23
24
|
//# sourceMappingURL=zoeSeat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AAsDO,iDAFI,OAAO,uBA0WL,UAAU,YACV,cAAc,uBACd,mBAAmB,iBACnB,aAAa,YACb,IAAI,CAAC,OAAO,CAAC,2BACb,OAAO;;;;;;;;;;;;;;;;QA3IZ,wCAAwC;8DAA5B,iBAAiB;;;;EAoKpC;6BA1ayB,kBAAkB"}
|
|
@@ -15,6 +15,10 @@ import {
|
|
|
15
15
|
coreUserSeatMethods,
|
|
16
16
|
} from './originalZoeSeat.js';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
20
|
+
*/
|
|
21
|
+
|
|
18
22
|
// ZoeSeatAdmin has the implementation of coreUserSeatMethods, but ZoeUserSeat
|
|
19
23
|
// is the facet shared with users. The latter transparently forwards to the
|
|
20
24
|
// former.
|
|
@@ -46,7 +50,7 @@ const ZoeUserSeat = harden({
|
|
|
46
50
|
* The zoeSeatAdmin is passed by Zoe to the ContractFacet (zcf), to allow zcf to
|
|
47
51
|
* query or update the allocation or exit the seat cleanly.
|
|
48
52
|
*
|
|
49
|
-
* @param {
|
|
53
|
+
* @param {Baggage} baggage
|
|
50
54
|
*/
|
|
51
55
|
export const makeZoeSeatAdminFactory = baggage => {
|
|
52
56
|
const makeDurablePublishKit = prepareDurablePublishKit(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AAiEO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AAiEO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAXoC,CAAC;qBAE7C,CAAA;oBAA0B,CAAC;;;;;;;GAobpC;6BApcyB,kBAAkB"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @property {Brand<'nat'>} actualBrandOut
|
|
5
5
|
* @property {Array<number>} [priceList]
|
|
6
6
|
* @property {Array<[number, number]>} [tradeList]
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {
|
|
7
|
+
* @property {TimerService} timer
|
|
8
|
+
* @property {RelativeTime} [quoteInterval]
|
|
9
9
|
* @property {ERef<Mint<'set', PriceDescription>>} [quoteMint]
|
|
10
10
|
* @property {Amount<'nat'>} [unitAmountIn]
|
|
11
11
|
*/
|
|
@@ -22,11 +22,13 @@ export type FakePriceAuthorityOptions = {
|
|
|
22
22
|
actualBrandOut: Brand<"nat">;
|
|
23
23
|
priceList?: number[] | undefined;
|
|
24
24
|
tradeList?: [number, number][] | undefined;
|
|
25
|
-
timer:
|
|
26
|
-
quoteInterval?:
|
|
25
|
+
timer: TimerService;
|
|
26
|
+
quoteInterval?: RelativeTime | undefined;
|
|
27
27
|
quoteMint?: globalThis.ERef<globalThis.Mint<"set", PriceDescription>> | undefined;
|
|
28
28
|
unitAmountIn?: import("@agoric/ertp").NatAmount | undefined;
|
|
29
29
|
};
|
|
30
30
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
31
|
+
import type { TimerService } from '@agoric/time';
|
|
32
|
+
import type { RelativeTime } from '@agoric/time';
|
|
31
33
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
32
34
|
//# sourceMappingURL=fakePriceAuthority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakePriceAuthority.d.ts","sourceRoot":"","sources":["fakePriceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fakePriceAuthority.d.ts","sourceRoot":"","sources":["fakePriceAuthority.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,gDAHW,yBAAyB,GACvB,OAAO,CAAC,cAAc,CAAC,CAwSnC;;mBAvTa,KAAK,CAAC,KAAK,CAAC;oBACZ,KAAK,CAAC,KAAK,CAAC;;;WAGZ,YAAY;;;;;oCAnBmE,4BAA4B;kCAC1F,cAAc;kCACd,cAAc;sCAFgD,4BAA4B"}
|
|
@@ -17,6 +17,9 @@ import {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
20
|
+
* @import {TimerService} from '@agoric/time';
|
|
21
|
+
* @import {RelativeTime} from '@agoric/time';
|
|
22
|
+
* @import {Timestamp} from '@agoric/time';
|
|
20
23
|
*/
|
|
21
24
|
|
|
22
25
|
const { coerceRelativeTimeRecord } = TimeMath;
|
|
@@ -32,8 +35,8 @@ const timestampLTE = (a, b) => TimeMath.compareAbs(a, b) <= 0;
|
|
|
32
35
|
* @property {Brand<'nat'>} actualBrandOut
|
|
33
36
|
* @property {Array<number>} [priceList]
|
|
34
37
|
* @property {Array<[number, number]>} [tradeList]
|
|
35
|
-
* @property {
|
|
36
|
-
* @property {
|
|
38
|
+
* @property {TimerService} timer
|
|
39
|
+
* @property {RelativeTime} [quoteInterval]
|
|
37
40
|
* @property {ERef<Mint<'set', PriceDescription>>} [quoteMint]
|
|
38
41
|
* @property {Amount<'nat'>} [unitAmountIn]
|
|
39
42
|
*/
|
|
@@ -90,7 +93,7 @@ export async function makeFakePriceAuthority(options) {
|
|
|
90
93
|
const quoteBrand = await E(quoteIssuer).getBrand();
|
|
91
94
|
|
|
92
95
|
/**
|
|
93
|
-
* @type {NotifierRecord<
|
|
96
|
+
* @type {NotifierRecord<Timestamp>}
|
|
94
97
|
* We need to have a notifier driven by the
|
|
95
98
|
* TimerService because if the timer pushes updates to individual
|
|
96
99
|
* QuoteNotifiers, we have a dependency inversion and the timer can never know
|
|
@@ -110,7 +113,7 @@ export async function makeFakePriceAuthority(options) {
|
|
|
110
113
|
*
|
|
111
114
|
* @param {Amount<'nat'>} amountIn
|
|
112
115
|
* @param {Brand} brandOut
|
|
113
|
-
* @param {
|
|
116
|
+
* @param {Timestamp} quoteTime
|
|
114
117
|
* @returns {PriceQuote}
|
|
115
118
|
*/
|
|
116
119
|
function priceInQuote(amountIn, brandOut, quoteTime) {
|
|
@@ -145,7 +148,7 @@ export async function makeFakePriceAuthority(options) {
|
|
|
145
148
|
/**
|
|
146
149
|
* @param {Brand<'nat'>} brandIn
|
|
147
150
|
* @param {Amount<'nat'>} amountOut
|
|
148
|
-
* @param {
|
|
151
|
+
* @param {Timestamp} quoteTime
|
|
149
152
|
* @returns {PriceQuote}
|
|
150
153
|
*/
|
|
151
154
|
function priceOutQuote(brandIn, amountOut, quoteTime) {
|
|
@@ -167,7 +170,7 @@ export async function makeFakePriceAuthority(options) {
|
|
|
167
170
|
let latestTick;
|
|
168
171
|
|
|
169
172
|
// clients who are waiting for a specific timestamp
|
|
170
|
-
/** @type { [when:
|
|
173
|
+
/** @type { [when: Timestamp, resolve: (quote: PriceQuote) => void][] } */
|
|
171
174
|
let timeClients = [];
|
|
172
175
|
|
|
173
176
|
// Check if a comparison request has been satisfied.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Amount, Brand, Issuer, IssuerKit, Payment, Purse} from '@agoric/ertp';
|
|
3
3
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
4
|
+
* @import {TimerService} from '@agoric/time';
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* @param {object} options
|
|
7
8
|
* @param {Brand<'nat'>} options.actualBrandIn
|
|
8
9
|
* @param {Brand<'nat'>} options.actualBrandOut
|
|
9
10
|
* @param {Ratio} options.initialPrice
|
|
10
|
-
* @param {
|
|
11
|
+
* @param {TimerService} options.timer
|
|
11
12
|
* @param {IssuerKit<'set', PriceDescription>} [options.quoteIssuerKit]
|
|
12
13
|
* @returns {PriceAuthority & { setPrice: (Ratio) => void; disable: () => void }}
|
|
13
14
|
*/
|
|
@@ -15,7 +16,7 @@ export function makeManualPriceAuthority(options: {
|
|
|
15
16
|
actualBrandIn: Brand<"nat">;
|
|
16
17
|
actualBrandOut: Brand<"nat">;
|
|
17
18
|
initialPrice: Ratio;
|
|
18
|
-
timer:
|
|
19
|
+
timer: TimerService;
|
|
19
20
|
quoteIssuerKit?: IssuerKit<"set", PriceDescription> | undefined;
|
|
20
21
|
}): PriceAuthority & {
|
|
21
22
|
setPrice: (Ratio: any) => void;
|
|
@@ -23,6 +24,7 @@ export function makeManualPriceAuthority(options: {
|
|
|
23
24
|
};
|
|
24
25
|
export type ManualPriceAuthority = ReturnType<typeof makeManualPriceAuthority>;
|
|
25
26
|
import type { Brand } from '@agoric/ertp';
|
|
27
|
+
import type { TimerService } from '@agoric/time';
|
|
26
28
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
27
29
|
import type { IssuerKit } from '@agoric/ertp';
|
|
28
30
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"AAaA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,kDAPG;IAA8B,aAAa,EAAnC,MAAM,KAAK,CAAC;IACU,cAAc,EAApC,MAAM,KAAK,CAAC;IACG,YAAY,EAA3B,KAAK;IACiB,KAAK,EAA3B,YAAY;IACiC,cAAc;CACnE,GAAU,cAAc,GAAG;IAAE,QAAQ,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA8E/E;mCACa,UAAU,CAAC,OAAO,wBAAwB,CAAC;2BA3FU,cAAc;kCAElD,cAAc;sCADgD,4BAA4B;+BADtD,cAAc;oCACY,4BAA4B"}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
/**
|
|
15
15
|
* @import {Amount, Brand, Issuer, IssuerKit, Payment, Purse} from '@agoric/ertp';
|
|
16
16
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
17
|
+
* @import {TimerService} from '@agoric/time';
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
* @param {Brand<'nat'>} options.actualBrandIn
|
|
22
23
|
* @param {Brand<'nat'>} options.actualBrandOut
|
|
23
24
|
* @param {Ratio} options.initialPrice
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {TimerService} options.timer
|
|
25
26
|
* @param {IssuerKit<'set', PriceDescription>} [options.quoteIssuerKit]
|
|
26
27
|
* @returns {PriceAuthority & { setPrice: (Ratio) => void; disable: () => void }}
|
|
27
28
|
*/
|
package/tools/manualTimer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function buildZoeManualTimer(log?: (...args: any[]) => void, startValue?:
|
|
1
|
+
export function buildZoeManualTimer(log?: (...args: any[]) => void, startValue?: Timestamp | bigint, options?: ZoeManualTimerOptions): ZoeManualTimer;
|
|
2
2
|
export default buildZoeManualTimer;
|
|
3
3
|
export type ZoeManualTimerOptions = {
|
|
4
|
-
timeStep?:
|
|
4
|
+
timeStep?: RelativeTime | bigint;
|
|
5
5
|
eventLoopIteration?: () => Promise<void>;
|
|
6
6
|
};
|
|
7
7
|
export type ManualTimerAdmin = {
|
|
@@ -15,6 +15,8 @@ export type ManualTimerAdmin = {
|
|
|
15
15
|
tickN: (nTimes: number, msg?: string) => Promise<void>;
|
|
16
16
|
};
|
|
17
17
|
export type ZoeManualTimer = ReturnType<typeof buildManualTimer> & RemotableBrand<ManualTimerAdmin, TimerServiceCommon & ManualTimerAdmin> & ManualTimerAdmin;
|
|
18
|
+
import type { Timestamp } from '@agoric/time';
|
|
19
|
+
import type { RelativeTime } from '@agoric/time';
|
|
18
20
|
import { buildManualTimer } from '@agoric/swingset-vat/tools/manual-timer.js';
|
|
19
21
|
import type { TimerServiceCommon } from '@agoric/time';
|
|
20
22
|
import type { RemotableBrand } from '@endo/eventual-send';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manualTimer.d.ts","sourceRoot":"","sources":["manualTimer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manualTimer.d.ts","sourceRoot":"","sources":["manualTimer.js"],"names":[],"mappings":"AA2EO,0CANI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,eACxB,SAAS,GAAG,MAAM,YAClB,qBAAqB,GACnB,cAAc,CAsD1B;;oCA5GY;IACT,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;;;;;;;;UAOU,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;WAItC,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;6BAG/C,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAAG,eAAe,gBAAgB,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,GAAG,gBAAgB;+BAxBlH,cAAc;kCADX,cAAc;iCAPZ,4CAA4C;wCAIxC,cAAc;oCAElB,qBAAqB"}
|
package/tools/manualTimer.js
CHANGED
|
@@ -8,6 +8,8 @@ import { TimeMath } from '@agoric/time';
|
|
|
8
8
|
* @import {TimerServiceCommon} from '@agoric/time';
|
|
9
9
|
* @import {RemotableObject} from '@endo/pass-style';
|
|
10
10
|
* @import {RemotableBrand} from '@endo/eventual-send';
|
|
11
|
+
* @import {RelativeTime} from '@agoric/time';
|
|
12
|
+
* @import {Timestamp} from '@agoric/time';
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
// we wrap SwingSet's buildManualTimer to accomodate the needs of
|
|
@@ -15,7 +17,7 @@ import { TimeMath } from '@agoric/time';
|
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* @typedef {{
|
|
18
|
-
* timeStep?:
|
|
20
|
+
* timeStep?: RelativeTime | bigint,
|
|
19
21
|
* eventLoopIteration?: () => Promise<void>,
|
|
20
22
|
* }} ZoeManualTimerOptions
|
|
21
23
|
*/
|
|
@@ -66,7 +68,7 @@ const nolog = (..._args) => {};
|
|
|
66
68
|
* boundaries
|
|
67
69
|
*
|
|
68
70
|
* @param {(...args: any[]) => void} [log]
|
|
69
|
-
* @param {
|
|
71
|
+
* @param {Timestamp | bigint} [startValue=0n]
|
|
70
72
|
* @param {ZoeManualTimerOptions} [options]
|
|
71
73
|
* @returns {ZoeManualTimer}
|
|
72
74
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {ZoeService} from '../src/types-index.js';
|
|
3
|
+
* @import {OracleStart} from '../src/contracts/oracle.js';
|
|
4
|
+
* @import {TimerService} from '@agoric/time';
|
|
3
5
|
*/
|
|
4
6
|
/**
|
|
5
7
|
* Start an instance of an Oracle that follows a script. The Oracle has access
|
|
@@ -12,12 +14,12 @@
|
|
|
12
14
|
* time, the event is 'nothing to report'.
|
|
13
15
|
*
|
|
14
16
|
* @param {Record<string, any>} script
|
|
15
|
-
* @param {Installation<
|
|
16
|
-
* @param {
|
|
17
|
+
* @param {Installation<OracleStart>} oracleInstallation
|
|
18
|
+
* @param {TimerService} timer
|
|
17
19
|
* @param {ZoeService} zoe
|
|
18
20
|
* @param {Issuer} feeIssuer
|
|
19
21
|
*/
|
|
20
|
-
export function makeScriptedOracle(script: Record<string, any>, oracleInstallation: Installation<
|
|
22
|
+
export function makeScriptedOracle(script: Record<string, any>, oracleInstallation: Installation<OracleStart>, timer: TimerService, zoe: ZoeService, feeIssuer: Issuer): Promise<{
|
|
21
23
|
publicFacet: object & {
|
|
22
24
|
query(query: OracleQuery): Promise<unknown>;
|
|
23
25
|
makeQueryInvitation(query: OracleQuery): Promise<globalThis.Invitation<unknown, never>>;
|
|
@@ -27,5 +29,7 @@ export function makeScriptedOracle(script: Record<string, any>, oracleInstallati
|
|
|
27
29
|
}>;
|
|
28
30
|
creatorFacet: OracleCreatorFacet;
|
|
29
31
|
}>;
|
|
32
|
+
import type { OracleStart } from '../src/contracts/oracle.js';
|
|
33
|
+
import type { TimerService } from '@agoric/time';
|
|
30
34
|
import type { ZoeService } from '../src/types-index.js';
|
|
31
35
|
//# sourceMappingURL=scriptedOracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedOracle.d.ts","sourceRoot":"","sources":["scriptedOracle.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"scriptedOracle.d.ts","sourceRoot":"","sources":["scriptedOracle.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,2CANW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,sBACnB,YAAY,CAAC,WAAW,CAAC,SACzB,YAAY,OACZ,UAAU,aACV,MAAM;;;;;;;;;GAqChB;iCAvD6B,4BAA4B;kCAC3B,cAAc;gCAFhB,uBAAuB"}
|
package/tools/scriptedOracle.js
CHANGED
|
@@ -4,6 +4,8 @@ import { Far } from '@endo/marshal';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @import {ZoeService} from '../src/types-index.js';
|
|
7
|
+
* @import {OracleStart} from '../src/contracts/oracle.js';
|
|
8
|
+
* @import {TimerService} from '@agoric/time';
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -17,8 +19,8 @@ import { Far } from '@endo/marshal';
|
|
|
17
19
|
* time, the event is 'nothing to report'.
|
|
18
20
|
*
|
|
19
21
|
* @param {Record<string, any>} script
|
|
20
|
-
* @param {Installation<
|
|
21
|
-
* @param {
|
|
22
|
+
* @param {Installation<OracleStart>} oracleInstallation
|
|
23
|
+
* @param {TimerService} timer
|
|
22
24
|
* @param {ZoeService} zoe
|
|
23
25
|
* @param {Issuer} feeIssuer
|
|
24
26
|
*/
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @import {Brand} from '@agoric/ertp';
|
|
3
3
|
* @import {TimerService, RelativeTime} from '@agoric/time';
|
|
4
4
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery} from '@agoric/zoe/tools/types.js';
|
|
5
|
+
* @import {Timestamp} from '@agoric/time';
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedPriceAuthority.d.ts","sourceRoot":"","sources":["scriptedPriceAuthority.js"],"names":[],"mappings":"AAWA
|
|
1
|
+
{"version":3,"file":"scriptedPriceAuthority.d.ts","sourceRoot":"","sources":["scriptedPriceAuthority.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,oDARG;IAA+B,aAAa,EAApC,MAAM,KAAK,CAAC;IACW,cAAc,EAArC,MAAM,KAAK,CAAC;IACO,SAAS,EAA5B,MAAM,EAAE;IACe,KAAK,EAA5B,YAAY;IACa,YAAY;IACd,aAAa,EAApC,YAAY;IACkC,cAAc;CAAC,kBAuFvE;2BAtGuB,cAAc;kCACO,cAAc;kCAAd,cAAc;sCACiC,4BAA4B;oCAA5B,4BAA4B"}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
* @import {Brand} from '@agoric/ertp';
|
|
14
14
|
* @import {TimerService, RelativeTime} from '@agoric/time';
|
|
15
15
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery} from '@agoric/zoe/tools/types.js';
|
|
16
|
+
* @import {Timestamp} from '@agoric/time';
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -82,7 +83,7 @@ export function makeScriptedPriceAuthority(options) {
|
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
/** @type {ERef<Notifier<
|
|
86
|
+
/** @type {ERef<Notifier<Timestamp>>} */
|
|
86
87
|
const notifier = E(timer).makeNotifier(0n, quoteInterval);
|
|
87
88
|
const priceAuthorityOptions = harden({
|
|
88
89
|
timer,
|