@agoric/zoe 0.26.3-dev-35cb8ca.0 → 0.26.3-dev-6498ae1.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 +218 -218
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +14 -14
- package/src/contractSupport/priceQuote.d.ts +1 -0
- package/src/contractSupport/priceQuote.d.ts.map +1 -1
- package/src/contractSupport/priceQuote.js +6 -1
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +5 -4
- package/src/typeGuards.d.ts +2 -1
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +1 -0
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +0 -1
- package/src/zoeService/offer/burnInvitation.d.ts +1 -1
- package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
- package/src/zoeService/offer/burnInvitation.js +3 -2
- package/src/zoeService/types-ambient.d.ts +1 -1
- package/src/zoeService/types-ambient.d.ts.map +1 -1
- package/src/zoeService/types-ambient.js +1 -1
- package/tools/fakePriceAuthority.d.ts +3 -2
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +9 -6
- package/tools/manualPriceAuthority.d.ts +3 -2
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +7 -6
- package/tools/scriptedPriceAuthority.d.ts.map +1 -1
- package/tools/scriptedPriceAuthority.js +6 -5
- package/tools/test-utils.d.ts +4 -4
- package/tools/test-utils.d.ts.map +1 -1
- package/tools/test-utils.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/zoe",
|
|
3
|
-
"version": "0.26.3-dev-
|
|
3
|
+
"version": "0.26.3-dev-6498ae1.0+6498ae1",
|
|
4
4
|
"description": "Zoe: the Smart Contract Framework for Offer Enforcement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/zoeService/zoe.js",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@agoric/base-zone": "0.1.1-dev-
|
|
47
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
48
|
-
"@agoric/internal": "0.3.3-dev-
|
|
49
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
52
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
53
|
-
"@agoric/time": "0.3.3-dev-
|
|
54
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
55
|
-
"@agoric/vow": "0.1.1-dev-
|
|
56
|
-
"@agoric/zone": "0.2.3-dev-
|
|
46
|
+
"@agoric/base-zone": "0.1.1-dev-6498ae1.0+6498ae1",
|
|
47
|
+
"@agoric/ertp": "0.16.3-dev-6498ae1.0+6498ae1",
|
|
48
|
+
"@agoric/internal": "0.3.3-dev-6498ae1.0+6498ae1",
|
|
49
|
+
"@agoric/notifier": "0.6.3-dev-6498ae1.0+6498ae1",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-6498ae1.0+6498ae1",
|
|
51
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-6498ae1.0+6498ae1",
|
|
52
|
+
"@agoric/swingset-vat": "0.32.3-dev-6498ae1.0+6498ae1",
|
|
53
|
+
"@agoric/time": "0.3.3-dev-6498ae1.0+6498ae1",
|
|
54
|
+
"@agoric/vat-data": "0.5.3-dev-6498ae1.0+6498ae1",
|
|
55
|
+
"@agoric/vow": "0.1.1-dev-6498ae1.0+6498ae1",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-6498ae1.0+6498ae1",
|
|
57
57
|
"@endo/bundle-source": "^3.5.1",
|
|
58
58
|
"@endo/captp": "^4.4.4",
|
|
59
59
|
"@endo/common": "^1.2.9",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"yargs-parser": "^21.1.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
73
|
+
"@agoric/kmarshal": "0.1.1-dev-6498ae1.0+6498ae1",
|
|
74
74
|
"@endo/init": "^1.1.8",
|
|
75
75
|
"ava": "^5.3.0",
|
|
76
76
|
"c8": "^10.1.2",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"typeCoverage": {
|
|
101
101
|
"atLeast": 85.11
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "6498ae1ecd1e8ada0eec29d2714e8cf69efbcee9"
|
|
104
104
|
}
|
|
@@ -4,6 +4,7 @@ export function getAmountOut(quote: PriceQuote): import("@agoric/ertp").NatAmoun
|
|
|
4
4
|
/** @type {(quote: PriceQuote) => import('@agoric/time').Timestamp} */
|
|
5
5
|
export const getTimestamp: (quote: PriceQuote) => import("@agoric/time").Timestamp;
|
|
6
6
|
export function unitAmount(brand: Brand<"nat">): Promise<import("@agoric/ertp").NatAmount>;
|
|
7
|
+
export function makePriceQuoteIssuer(): IssuerKit<"set", PriceDescription>;
|
|
7
8
|
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
8
9
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
9
10
|
//# sourceMappingURL=priceQuote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAoBO,2CAHI,UAAU,GACR,gBAAgB,CAM5B;AAGM,mCADK,UAAU,oCACiD;AAEhE,oCADK,UAAU,oCACmD;AACzE,sEAAsE;AACtE,2BADW,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,KAAK,CAAC,KAAK,CAAC,6CAMvB;
|
|
1
|
+
{"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAoBO,2CAHI,UAAU,GACR,gBAAgB,CAM5B;AAGM,mCADK,UAAU,oCACiD;AAEhE,oCADK,UAAU,oCACmD;AACzE,sEAAsE;AACtE,2BADW,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,KAAK,CAAC,KAAK,CAAC,6CAMvB;AAGM,wCACM,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAE5C;gCArC0F,4BAA4B;sCAA5B,4BAA4B"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Fail } from '@endo/errors';
|
|
4
4
|
import { Nat } from '@endo/nat';
|
|
5
5
|
import { E } from '@endo/eventual-send';
|
|
6
|
-
import { AmountMath } from '@agoric/ertp';
|
|
6
|
+
import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
@@ -39,3 +39,8 @@ export const unitAmount = async brand => {
|
|
|
39
39
|
return AmountMath.make(brand, 10n ** Nat(decimalPlaces));
|
|
40
40
|
};
|
|
41
41
|
harden(unitAmount);
|
|
42
|
+
|
|
43
|
+
export const makePriceQuoteIssuer = () =>
|
|
44
|
+
/** @type {IssuerKit<'set', PriceDescription>} */ (
|
|
45
|
+
makeIssuerKit('quote', AssetKind.SET)
|
|
46
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAqC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AQ,GAAG,MAAM,UACjB,WAAW,KACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;;;;QAmHxC,sBAAsB;;;;;QAAtB,sBAAsB;;;GAOzB;gCAvlB4B,wBAAwB;sCACwB,4BAA4B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp';
|
|
1
|
+
import { AmountMath } from '@agoric/ertp';
|
|
3
2
|
import { assertAllDefined } from '@agoric/internal';
|
|
3
|
+
import { notForProductionUse } from '@agoric/internal/src/magic-cookie-test-only.js';
|
|
4
4
|
import {
|
|
5
5
|
makeNotifierKit,
|
|
6
6
|
makeStoredPublishKit,
|
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
} from '@agoric/notifier';
|
|
9
9
|
import { makeLegacyMap } from '@agoric/store';
|
|
10
10
|
import { TimeMath } from '@agoric/time';
|
|
11
|
+
import { Fail, q } from '@endo/errors';
|
|
11
12
|
import { E } from '@endo/eventual-send';
|
|
12
13
|
import { Far } from '@endo/marshal';
|
|
13
|
-
import { notForProductionUse } from '@agoric/internal/src/magic-cookie-test-only.js';
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
16
|
calculateMedian,
|
|
17
17
|
makeOnewayPriceAuthorityKit,
|
|
18
|
+
makePriceQuoteIssuer,
|
|
18
19
|
} from '../contractSupport/index.js';
|
|
19
20
|
import {
|
|
20
21
|
addRatios,
|
|
@@ -82,7 +83,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
82
83
|
const quoteMint =
|
|
83
84
|
privateArgs.quoteMint ||
|
|
84
85
|
// makeIssuerKit fails upgrade, this contract is for demo only
|
|
85
|
-
|
|
86
|
+
makePriceQuoteIssuer().mint;
|
|
86
87
|
const quoteIssuerRecord = await zcf.saveIssuer(
|
|
87
88
|
E(quoteMint).getIssuer(),
|
|
88
89
|
'Quote',
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -40,7 +40,8 @@ export const EmptyProposalShape: import("@endo/patterns").Matcher;
|
|
|
40
40
|
export function isOnDemandExitRule(exit: any): boolean;
|
|
41
41
|
export function isWaivedExitRule(exit: ExitRule): exit is WaivedExitRule;
|
|
42
42
|
export function isAfterDeadlineExitRule(exit: ExitRule): exit is AfterDeadlineExitRule;
|
|
43
|
-
|
|
43
|
+
/** @type {TypedPattern<InvitationDetails>} */
|
|
44
|
+
export const InvitationElementShape: TypedPattern<InvitationDetails>;
|
|
44
45
|
export const OfferHandlerI: import("@endo/patterns").InterfaceGuard<{
|
|
45
46
|
handle: import("@endo/patterns").MethodGuard;
|
|
46
47
|
}>;
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;GAEG;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,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAGD,
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;GAEG;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,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAGD,8CAA8C;AAC9C,qCADW,aAAa,iBAAiB,CAAC,CAMvC;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;;;;;kCA7X4B,kBAAkB;4BAN1C,cAAc"}
|
package/src/typeGuards.js
CHANGED
|
@@ -133,6 +133,7 @@ export const isAfterDeadlineExitRule = exit => {
|
|
|
133
133
|
};
|
|
134
134
|
harden(isAfterDeadlineExitRule);
|
|
135
135
|
|
|
136
|
+
/** @type {TypedPattern<InvitationDetails>} */
|
|
136
137
|
export const InvitationElementShape = M.splitRecord({
|
|
137
138
|
description: M.string(),
|
|
138
139
|
handle: InvitationHandleShape,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAgBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;
|
|
1
|
+
{"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAgBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;EA+BxE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function burnInvitation(invitationIssuer: Issuer
|
|
1
|
+
export function burnInvitation<K extends AssetKind>(invitationIssuer: Issuer<K>, invitation: ERef<Payment<K>>): Promise<{
|
|
2
2
|
instanceHandle: Instance;
|
|
3
3
|
invitationHandle: InvitationHandle;
|
|
4
4
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"AAiBO,+BARkB,CAAC,SAAZ,SAAU,oBACb,MAAM,CAAC,CAAC,CAAC,cACT,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GACd,OAAO,CAAC;IAChB,cAAc,EAAE,QAAQ,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC,CA0BJ"}
|
|
@@ -7,8 +7,9 @@ import { E } from '@endo/eventual-send';
|
|
|
7
7
|
* Burn the invitation, assert that only one invitation was burned,
|
|
8
8
|
* and extract and return the instanceHandle and invitationHandle
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @param {
|
|
10
|
+
* @template {AssetKind} K
|
|
11
|
+
* @param {Issuer<K>} invitationIssuer
|
|
12
|
+
* @param {ERef<Payment<K>>} invitation
|
|
12
13
|
* @returns {Promise<{
|
|
13
14
|
* instanceHandle: Instance,
|
|
14
15
|
* invitationHandle: InvitationHandle,
|
|
@@ -122,7 +122,7 @@ type UserSeat<OR extends unknown = unknown> = {
|
|
|
122
122
|
* corresponding to the keyword, an error will be thrown. (It used to return
|
|
123
123
|
* undefined.)
|
|
124
124
|
*/
|
|
125
|
-
getPayout: (keyword: Keyword) => Promise<Payment<any>>;
|
|
125
|
+
getPayout: (keyword: Keyword) => Promise<Payment<any, any>>;
|
|
126
126
|
getOfferResult: () => Promise<OR>;
|
|
127
127
|
/**
|
|
128
128
|
* Note: Only works if the seat's `proposal` has an `OnDemand` `exit` clause. Zoe's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;yBAmBc,mBAAmB;aASnB,aAAa;qBACb,eAAe;mBACf,OAAO,YAAY,EAAE,aAAa;WAClC,KAAK;oBACL,OAAO,YAAY,EAAE,cAAc;gBACnC,UAAU;eACV,SAAS;cACT,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;gCACd,0BAA0B;iBAC1B,WAAW;qBACX,eAAe;;;;;0BACf,oBAAoB;kBAGpB,YAAY;sBACZ,gBAAgB;iCAChB,2BAA2B;;;;;mCAC3B,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,gBAAgB,EAAE,OAAO,GAAG,SAAS;;iCAOrF,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;0BAKzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;8BAKtB;IACR,eAAe,EAAE,eAAe,CAAC;CAClC;6BAKO,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,KAChC,OAAO,CAAC,mBAAmB,CAAC;4BAK9B,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,KAChC,OAAO,CAAC,kBAAkB,CAAC;iCAK7B,OAAO,YAAY,EAAE,QAAQ,CAAC,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QAAQ,CAAC,GAAG,CAAC;eAIlC;IAAC,SAAS,EAAE,OAAO,sBAAsB,EAAE,SAAS,CAAA;CAAE,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG;IAAC,EAAE,EAAE,QAAQ,CAAA;CAAC;;;;oBAIxF,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;6BAKnB,MAAM,CAAC,OAAO,EAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;4BAClC,MAAM,CAAC,OAAO,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;;kBAK3B,YAAY;cACZ,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC;YAClC,gBAAgB;iBAChB,MAAM;;;kBAKN,EAAE,UACH,OAAO,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC;uBAItB,CAAC,SAAf,YAAa,IACd,OAAO,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC;;UAKxC,MAAM;eACN,SAAS;iBACT,WAAW;;;uBAKX,QAAQ;;qBAIT,MAAM,CAAC,eAAe,CAAC"}
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
* @property {() => Promise<PaymentPKeywordRecord>} getPayouts
|
|
200
200
|
* returns a promise for a KeywordPaymentRecord containing all the payouts from
|
|
201
201
|
* this seat. The promise will resolve after the seat has exited.
|
|
202
|
-
* @property {(keyword: Keyword) => Promise<Payment<any>>} getPayout
|
|
202
|
+
* @property {(keyword: Keyword) => Promise<Payment<any, any>>} getPayout
|
|
203
203
|
* returns a promise for the Payment corresponding to the indicated keyword.
|
|
204
204
|
* The promise will resolve after the seat has exited. If there is no payment
|
|
205
205
|
* corresponding to the keyword, an error will be thrown. (It used to return
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @property {Array<[number, number]>} [tradeList]
|
|
7
7
|
* @property {import('@agoric/time').TimerService} timer
|
|
8
8
|
* @property {import('@agoric/time').RelativeTime} [quoteInterval]
|
|
9
|
-
* @property {ERef<Mint<'set'>>} [quoteMint]
|
|
9
|
+
* @property {ERef<Mint<'set', PriceDescription>>} [quoteMint]
|
|
10
10
|
* @property {Amount<'nat'>} [unitAmountIn]
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
@@ -24,8 +24,9 @@ export type FakePriceAuthorityOptions = {
|
|
|
24
24
|
tradeList?: [number, number][] | undefined;
|
|
25
25
|
timer: import("@agoric/time").TimerService;
|
|
26
26
|
quoteInterval?: import("@agoric/time").RelativeTime | undefined;
|
|
27
|
-
quoteMint?: globalThis.ERef<globalThis.Mint<"set">> | undefined;
|
|
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 { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
31
32
|
//# 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":"AA4BA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,gDAHW,yBAAyB,GACvB,OAAO,CAAC,cAAc,CAAC,CAwSnC;;mBAvTa,KAAK,CAAC,KAAK,CAAC;oBACZ,KAAK,CAAC,KAAK,CAAC;;;WAGZ,OAAO,cAAc,EAAE,YAAY;;;;;oCAhB4C,4BAA4B;sCAA5B,4BAA4B"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { Fail } from '@endo/errors';
|
|
2
|
-
import { makePromiseKit } from '@endo/promise-kit';
|
|
3
2
|
import { E } from '@endo/eventual-send';
|
|
4
3
|
import { Far } from '@endo/marshal';
|
|
4
|
+
import { makePromiseKit } from '@endo/promise-kit';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { AmountMath } from '@agoric/ertp';
|
|
7
7
|
import {
|
|
8
|
-
makeNotifierKit,
|
|
9
8
|
makeNotifierFromAsyncIterable,
|
|
9
|
+
makeNotifierKit,
|
|
10
10
|
} from '@agoric/notifier';
|
|
11
11
|
import { TimeMath } from '@agoric/time';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
makePriceQuoteIssuer,
|
|
15
|
+
natSafeMath,
|
|
16
|
+
} from '../src/contractSupport/index.js';
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
@@ -31,7 +34,7 @@ const timestampLTE = (a, b) => TimeMath.compareAbs(a, b) <= 0;
|
|
|
31
34
|
* @property {Array<[number, number]>} [tradeList]
|
|
32
35
|
* @property {import('@agoric/time').TimerService} timer
|
|
33
36
|
* @property {import('@agoric/time').RelativeTime} [quoteInterval]
|
|
34
|
-
* @property {ERef<Mint<'set'>>} [quoteMint]
|
|
37
|
+
* @property {ERef<Mint<'set', PriceDescription>>} [quoteMint]
|
|
35
38
|
* @property {Amount<'nat'>} [unitAmountIn]
|
|
36
39
|
*/
|
|
37
40
|
|
|
@@ -51,7 +54,7 @@ export async function makeFakePriceAuthority(options) {
|
|
|
51
54
|
timer,
|
|
52
55
|
unitAmountIn = AmountMath.make(actualBrandIn, 1n),
|
|
53
56
|
quoteInterval = 1n,
|
|
54
|
-
quoteMint =
|
|
57
|
+
quoteMint = makePriceQuoteIssuer().mint,
|
|
55
58
|
} = options;
|
|
56
59
|
|
|
57
60
|
tradeList ||
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @param {Brand<'nat'>} options.actualBrandOut
|
|
8
8
|
* @param {Ratio} options.initialPrice
|
|
9
9
|
* @param {import('@agoric/time').TimerService} options.timer
|
|
10
|
-
* @param {IssuerKit<'set'>} [options.quoteIssuerKit]
|
|
10
|
+
* @param {IssuerKit<'set', PriceDescription>} [options.quoteIssuerKit]
|
|
11
11
|
* @returns {PriceAuthority & { setPrice: (Ratio) => void; disable: () => void }}
|
|
12
12
|
*/
|
|
13
13
|
export function makeManualPriceAuthority(options: {
|
|
@@ -15,11 +15,12 @@ export function makeManualPriceAuthority(options: {
|
|
|
15
15
|
actualBrandOut: Brand<"nat">;
|
|
16
16
|
initialPrice: Ratio;
|
|
17
17
|
timer: import("@agoric/time").TimerService;
|
|
18
|
-
quoteIssuerKit?: globalThis.IssuerKit<"set"> | undefined;
|
|
18
|
+
quoteIssuerKit?: globalThis.IssuerKit<"set", PriceDescription> | undefined;
|
|
19
19
|
}): PriceAuthority & {
|
|
20
20
|
setPrice: (Ratio: any) => void;
|
|
21
21
|
disable: () => void;
|
|
22
22
|
};
|
|
23
23
|
export type ManualPriceAuthority = ReturnType<typeof makeManualPriceAuthority>;
|
|
24
|
+
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
24
25
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
25
26
|
//# sourceMappingURL=manualPriceAuthority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"AAaA;;GAEG;AAEH;;;;;;;;GAQG;AACH,kDAPG;IAA8B,aAAa,EAAnC,KAAK,CAAC,KAAK,CAAC;IACU,cAAc,EAApC,KAAK,CAAC,KAAK,CAAC;IACG,YAAY,EAA3B,KAAK;IACwC,KAAK,EAAlD,OAAO,cAAc,EAAE,YAAY;IACU,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;sCAzFoC,4BAA4B;oCAA5B,4BAA4B"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
import { AmountMath
|
|
3
|
+
import { AmountMath } from '@agoric/ertp';
|
|
4
|
+
import { makeNotifierKit } from '@agoric/notifier';
|
|
4
5
|
import { E } from '@endo/eventual-send';
|
|
5
6
|
import { Far } from '@endo/marshal';
|
|
6
|
-
import { makeNotifierKit } from '@agoric/notifier';
|
|
7
7
|
import {
|
|
8
|
-
makeOnewayPriceAuthorityKit,
|
|
9
|
-
floorMultiplyBy,
|
|
10
8
|
floorDivideBy,
|
|
9
|
+
floorMultiplyBy,
|
|
10
|
+
makeOnewayPriceAuthorityKit,
|
|
11
|
+
makePriceQuoteIssuer,
|
|
11
12
|
} from '../src/contractSupport/index.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
* @param {Brand<'nat'>} options.actualBrandOut
|
|
21
22
|
* @param {Ratio} options.initialPrice
|
|
22
23
|
* @param {import('@agoric/time').TimerService} options.timer
|
|
23
|
-
* @param {IssuerKit<'set'>} [options.quoteIssuerKit]
|
|
24
|
+
* @param {IssuerKit<'set', PriceDescription>} [options.quoteIssuerKit]
|
|
24
25
|
* @returns {PriceAuthority & { setPrice: (Ratio) => void; disable: () => void }}
|
|
25
26
|
*/
|
|
26
27
|
export function makeManualPriceAuthority(options) {
|
|
@@ -29,7 +30,7 @@ export function makeManualPriceAuthority(options) {
|
|
|
29
30
|
actualBrandOut,
|
|
30
31
|
initialPrice, // brandOut / brandIn
|
|
31
32
|
timer,
|
|
32
|
-
quoteIssuerKit =
|
|
33
|
+
quoteIssuerKit = makePriceQuoteIssuer(),
|
|
33
34
|
} = options;
|
|
34
35
|
const { brand, issuer: quoteIssuer, mint: quoteMint } = quoteIssuerKit;
|
|
35
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptedPriceAuthority.d.ts","sourceRoot":"","sources":["scriptedPriceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scriptedPriceAuthority.d.ts","sourceRoot":"","sources":["scriptedPriceAuthority.js"],"names":[],"mappings":"AAWA;;GAEG;AAEH,yEAoFC;oCAvF4F,4BAA4B"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AmountMath
|
|
2
|
-
import { E } from '@endo/eventual-send';
|
|
3
|
-
import { Far } from '@endo/marshal';
|
|
1
|
+
import { AmountMath } from '@agoric/ertp';
|
|
4
2
|
import { observeNotifier } from '@agoric/notifier';
|
|
5
3
|
import { TimeMath } from '@agoric/time';
|
|
4
|
+
import { E } from '@endo/eventual-send';
|
|
5
|
+
import { Far } from '@endo/marshal';
|
|
6
6
|
import {
|
|
7
|
-
natSafeMath,
|
|
8
7
|
makeOnewayPriceAuthorityKit,
|
|
8
|
+
makePriceQuoteIssuer,
|
|
9
|
+
natSafeMath,
|
|
9
10
|
} from '../src/contractSupport/index.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -20,7 +21,7 @@ export function makeScriptedPriceAuthority(options) {
|
|
|
20
21
|
timer,
|
|
21
22
|
unitAmountIn = AmountMath.make(actualBrandIn, 1n),
|
|
22
23
|
quoteInterval = 1n,
|
|
23
|
-
quoteIssuerKit =
|
|
24
|
+
quoteIssuerKit = makePriceQuoteIssuer(),
|
|
24
25
|
} = options;
|
|
25
26
|
const { brand, issuer: quoteIssuer, mint: quoteMint } = quoteIssuerKit;
|
|
26
27
|
let currentPrice = priceList[0];
|
package/tools/test-utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function withAmountUtils(kit: Pick<IssuerKit<"nat">, "brand" | "issuer" | "mint">): {
|
|
1
|
+
export function withAmountUtils(kit: Pick<IssuerKit<"nat", any>, "brand" | "issuer" | "mint">): {
|
|
2
2
|
/** @param {NatValue} v */
|
|
3
3
|
make: (v: NatValue) => import("@agoric/ertp").NatAmount;
|
|
4
4
|
makeEmpty: () => import("@agoric/ertp").NatAmount;
|
|
@@ -10,10 +10,10 @@ export function withAmountUtils(kit: Pick<IssuerKit<"nat">, "brand" | "issuer" |
|
|
|
10
10
|
/** @param {number} n */
|
|
11
11
|
units: (n: number) => import("@agoric/ertp").NatAmount;
|
|
12
12
|
/** The intact Exo remotable */
|
|
13
|
-
issuerKit: Pick<IssuerKit<"nat">, "brand" | "issuer" | "mint">;
|
|
13
|
+
issuerKit: Pick<IssuerKit<"nat", any>, "brand" | "issuer" | "mint">;
|
|
14
14
|
brand: Brand<"nat">;
|
|
15
|
-
issuer: Issuer<"nat",
|
|
16
|
-
mint: globalThis.Mint<"nat",
|
|
15
|
+
issuer: Issuer<"nat", any>;
|
|
16
|
+
mint: globalThis.Mint<"nat", any>;
|
|
17
17
|
};
|
|
18
18
|
export { makeFakeStorageKit } from "@agoric/internal/src/storage-test-utils.js";
|
|
19
19
|
export type AmountUtils = ReturnType<typeof withAmountUtils>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["test-utils.js"],"names":[],"mappings":"AAQO,qCADK,IAAI,CAAC,UAAU,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["test-utils.js"],"names":[],"mappings":"AAQO,qCADK,IAAI,CAAC,UAAU,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAKhE,0BAA0B;cAAd,QAAQ;;IAGpB;;;OAGG;mBAFQ,QAAQ,MACR,QAAQ;IAGnB,wBAAwB;eAAZ,MAAM;IAGlB,+BAA+B;;;;;EAGlC;;0BACa,UAAU,CAAC,OAAO,eAAe,CAAC;+BAvB2B,cAAc;8BAAd,cAAc;2BAAd,cAAc;4BAAd,cAAc"}
|
package/tools/test-utils.js
CHANGED
|
@@ -5,7 +5,7 @@ import { makeRatio } from '../src/contractSupport/ratio.js';
|
|
|
5
5
|
* @import {Amount, Brand, DepositFacet, Issuer, IssuerKit, NatValue} from '@agoric/ertp';
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/** @param {Pick<IssuerKit<'nat'>, 'brand' | 'issuer' | 'mint'>} kit */
|
|
8
|
+
/** @param {Pick<IssuerKit<'nat', any>, 'brand' | 'issuer' | 'mint'>} kit */
|
|
9
9
|
export const withAmountUtils = kit => {
|
|
10
10
|
const decimalPlaces = kit.issuer.getDisplayInfo?.()?.decimalPlaces ?? 6;
|
|
11
11
|
return {
|