@agoric/smart-wallet 0.5.4-dev-35d20eb.0 → 0.5.4-dev-ceec1d5.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/package.json +14 -14
- package/src/offerWatcher.d.ts +5 -3
- package/src/offerWatcher.d.ts.map +1 -1
- package/src/offerWatcher.js +8 -5
- package/src/types.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/smart-wallet",
|
|
3
|
-
"version": "0.5.4-dev-
|
|
3
|
+
"version": "0.5.4-dev-ceec1d5.0+ceec1d5",
|
|
4
4
|
"description": "Wallet contract",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"lint:eslint": "eslint ."
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
20
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
21
|
-
"@agoric/zone": "0.2.3-dev-
|
|
19
|
+
"@agoric/cosmic-proto": "0.4.1-dev-ceec1d5.0+ceec1d5",
|
|
20
|
+
"@agoric/swingset-vat": "0.32.3-dev-ceec1d5.0+ceec1d5",
|
|
21
|
+
"@agoric/zone": "0.2.3-dev-ceec1d5.0+ceec1d5",
|
|
22
22
|
"@endo/bundle-source": "^3.2.3",
|
|
23
23
|
"@endo/captp": "^4.2.0",
|
|
24
24
|
"@endo/init": "^1.1.2",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"import-meta-resolve": "^2.2.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@agoric/assert": "0.6.1-dev-
|
|
30
|
-
"@agoric/casting": "0.4.3-dev-
|
|
31
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
32
|
-
"@agoric/internal": "0.3.3-dev-
|
|
33
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
34
|
-
"@agoric/store": "0.9.3-dev-
|
|
35
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
36
|
-
"@agoric/vats": "0.15.2-dev-
|
|
37
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
29
|
+
"@agoric/assert": "0.6.1-dev-ceec1d5.0+ceec1d5",
|
|
30
|
+
"@agoric/casting": "0.4.3-dev-ceec1d5.0+ceec1d5",
|
|
31
|
+
"@agoric/ertp": "0.16.3-dev-ceec1d5.0+ceec1d5",
|
|
32
|
+
"@agoric/internal": "0.3.3-dev-ceec1d5.0+ceec1d5",
|
|
33
|
+
"@agoric/notifier": "0.6.3-dev-ceec1d5.0+ceec1d5",
|
|
34
|
+
"@agoric/store": "0.9.3-dev-ceec1d5.0+ceec1d5",
|
|
35
|
+
"@agoric/vat-data": "0.5.3-dev-ceec1d5.0+ceec1d5",
|
|
36
|
+
"@agoric/vats": "0.15.2-dev-ceec1d5.0+ceec1d5",
|
|
37
|
+
"@agoric/zoe": "0.26.3-dev-ceec1d5.0+ceec1d5",
|
|
38
38
|
"@endo/eventual-send": "^1.2.2",
|
|
39
39
|
"@endo/far": "^1.1.2",
|
|
40
40
|
"@endo/marshal": "^1.5.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"typeCoverage": {
|
|
71
71
|
"atLeast": 94.35
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "ceec1d5655ab909bfa85e312d53cddeee64623f3"
|
|
74
74
|
}
|
package/src/offerWatcher.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export function prepareOfferWatcher(baggage: import("@agoric/vat-data").Baggage)
|
|
|
12
12
|
* @param {import('./types.js').PublicSubscribers} publicSubscribers
|
|
13
13
|
*/
|
|
14
14
|
onNewContinuingOffer(offerId: string, invitationAmount: Amount<"set">, invitationMakers: import("./types.js").InvitationMakers, publicSubscribers: import("./types.js").PublicSubscribers): void;
|
|
15
|
-
/** @param {
|
|
16
|
-
publishResult(result:
|
|
15
|
+
/** @param {Passable | ContinuingOfferResult} result */
|
|
16
|
+
publishResult(result: Passable | ContinuingOfferResult): void;
|
|
17
17
|
/**
|
|
18
18
|
* Called when the offer result promise rejects. The other two watchers
|
|
19
19
|
* are waiting for particular values out of Zoe but they settle at the
|
|
@@ -38,11 +38,13 @@ export type OfferPromiseWatcher<T extends unknown> = {
|
|
|
38
38
|
onRejected?: ((reason: unknown, args_0: UserSeat<unknown>) => void) | undefined;
|
|
39
39
|
};
|
|
40
40
|
export type OutcomeWatchers = {
|
|
41
|
-
resultWatcher: OfferPromiseWatcher<
|
|
41
|
+
resultWatcher: OfferPromiseWatcher<Passable>;
|
|
42
42
|
numWantsWatcher: OfferPromiseWatcher<number>;
|
|
43
43
|
paymentWatcher: OfferPromiseWatcher<PaymentPKeywordRecord>;
|
|
44
44
|
};
|
|
45
45
|
export type MakeOfferWatcher = ReturnType<typeof prepareOfferWatcher>;
|
|
46
46
|
export type OfferWatcher = ReturnType<MakeOfferWatcher>;
|
|
47
47
|
import type { OfferSpec } from "./offers.js";
|
|
48
|
+
import type { Passable } from '@endo/pass-style';
|
|
49
|
+
import type { ContinuingOfferResult } from "./types.js";
|
|
48
50
|
//# sourceMappingURL=offerWatcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offerWatcher.d.ts","sourceRoot":"","sources":["offerWatcher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"offerWatcher.d.ts","sourceRoot":"","sources":["offerWatcher.js"],"names":[],"mappings":"AAoEO,6CAHI,eAAe,QACf,QAAQ,oDAQlB;AAkCM,6CAFI,OAAO,kBAAkB,EAAE,OAAO;;QAyBrC;;WAEG;yCADQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;QAQlC;;;;;WAKG;sCAJQ,MAAM,oBACN,MAAM,CAAC,KAAK,CAAC,oBACb,OAAO,YAAY,EAAE,gBAAgB,qBACrC,OAAO,YAAY,EAAE,iBAAiB;QAkBjD,uDAAuD;;QAoCvD;;;;;;WAMG;yBADQ,KAAK;;IAclB,gDAAgD;oBAArC,eAAe,CAAC,gBAAgB,CAAC;IA+B5C,+CAA+C;mBAApC,eAAe,CAAC,eAAe,CAAC;IAwB3C,iDAAiD;qBAAtC,eAAe,CAAC,iBAAiB,CAAC;GA2BlD;;;;gCApR2B,CAAC;;;;;;qBAMP,mBAAmB,CAAC,MAAM,CAAC;oBAC5B,mBAAmB,CAAC,qBAAqB,CAAC;;+BAgRjD,UAAU,CAAC,OAAO,mBAAmB,CAAC;2BACtC,UAAU,CAAC,gBAAgB,CAAC;+BAhSd,aAAa;8BAEd,kBAAkB;2CADL,YAAY"}
|
package/src/offerWatcher.js
CHANGED
|
@@ -12,8 +12,12 @@ import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
|
|
|
12
12
|
|
|
13
13
|
import { UNPUBLISHED_RESULT } from './offers.js';
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @import {OfferSpec} from "./offers.js";
|
|
17
|
+
* @import {ContinuingOfferResult} from "./types.js";
|
|
18
|
+
* @import {Passable} from '@endo/pass-style';
|
|
19
|
+
* @import {PromiseWatcher} from '@agoric/swingset-liveslots';
|
|
20
|
+
*/
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* @template {any} T
|
|
@@ -22,7 +26,7 @@ import { UNPUBLISHED_RESULT } from './offers.js';
|
|
|
22
26
|
|
|
23
27
|
/**
|
|
24
28
|
* @typedef {{
|
|
25
|
-
* resultWatcher: OfferPromiseWatcher<
|
|
29
|
+
* resultWatcher: OfferPromiseWatcher<Passable>;
|
|
26
30
|
* numWantsWatcher: OfferPromiseWatcher<number>;
|
|
27
31
|
* paymentWatcher: OfferPromiseWatcher<PaymentPKeywordRecord>;
|
|
28
32
|
* }} OutcomeWatchers
|
|
@@ -156,7 +160,7 @@ export const prepareOfferWatcher = baggage => {
|
|
|
156
160
|
);
|
|
157
161
|
},
|
|
158
162
|
|
|
159
|
-
/** @param {
|
|
163
|
+
/** @param {Passable | ContinuingOfferResult} result */
|
|
160
164
|
publishResult(result) {
|
|
161
165
|
const { state, facets } = this;
|
|
162
166
|
|
|
@@ -182,7 +186,6 @@ export const prepareOfferWatcher = baggage => {
|
|
|
182
186
|
state.invitationAmount,
|
|
183
187
|
// @ts-expect-error narrowed by passStyle
|
|
184
188
|
result.invitationMakers,
|
|
185
|
-
// @ts-expect-error narrowed by passStyle
|
|
186
189
|
result.publicSubscribers,
|
|
187
190
|
);
|
|
188
191
|
}
|
package/src/types.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ export type InvitationMakers = Record<
|
|
|
29
29
|
|
|
30
30
|
export type PublicSubscribers = Record<string, ERef<StoredFacet>>;
|
|
31
31
|
|
|
32
|
+
export interface ContinuingOfferResult {
|
|
33
|
+
invitationMakers: InvitationMakers;
|
|
34
|
+
publicSubscribers: PublicSubscribers;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
export type Cell<T> = {
|
|
33
38
|
get: () => T;
|
|
34
39
|
set(val: T): void;
|