@agoric/smart-wallet 0.5.4-dev-e2e36cc.0 → 0.5.4-dev-e6cde48.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 +13 -13
- package/src/offerWatcher.d.ts +6 -8
- package/src/offerWatcher.d.ts.map +1 -1
- package/src/offerWatcher.js +4 -10
- package/src/offers.d.ts +1 -1
- package/src/offers.d.ts.map +1 -1
- package/src/offers.js +1 -1
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-e6cde48.0+e6cde48",
|
|
4
4
|
"description": "Wallet contract",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -16,8 +16,8 @@
|
|
|
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-
|
|
19
|
+
"@agoric/cosmic-proto": "0.4.1-dev-e6cde48.0+e6cde48",
|
|
20
|
+
"@agoric/swingset-vat": "0.32.3-dev-e6cde48.0+e6cde48",
|
|
21
21
|
"@endo/bundle-source": "^3.2.2",
|
|
22
22
|
"@endo/captp": "^4.1.1",
|
|
23
23
|
"@endo/init": "^1.1.1",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"import-meta-resolve": "^2.2.1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@agoric/assert": "0.6.1-dev-
|
|
29
|
-
"@agoric/casting": "0.4.3-dev-
|
|
30
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
31
|
-
"@agoric/internal": "0.3.3-dev-
|
|
32
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
33
|
-
"@agoric/store": "0.9.3-dev-
|
|
34
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
35
|
-
"@agoric/vats": "0.15.2-dev-
|
|
36
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
28
|
+
"@agoric/assert": "0.6.1-dev-e6cde48.0+e6cde48",
|
|
29
|
+
"@agoric/casting": "0.4.3-dev-e6cde48.0+e6cde48",
|
|
30
|
+
"@agoric/ertp": "0.16.3-dev-e6cde48.0+e6cde48",
|
|
31
|
+
"@agoric/internal": "0.3.3-dev-e6cde48.0+e6cde48",
|
|
32
|
+
"@agoric/notifier": "0.6.3-dev-e6cde48.0+e6cde48",
|
|
33
|
+
"@agoric/store": "0.9.3-dev-e6cde48.0+e6cde48",
|
|
34
|
+
"@agoric/vat-data": "0.5.3-dev-e6cde48.0+e6cde48",
|
|
35
|
+
"@agoric/vats": "0.15.2-dev-e6cde48.0+e6cde48",
|
|
36
|
+
"@agoric/zoe": "0.26.3-dev-e6cde48.0+e6cde48",
|
|
37
37
|
"@endo/eventual-send": "^1.2.1",
|
|
38
38
|
"@endo/far": "^1.1.1",
|
|
39
39
|
"@endo/marshal": "^1.4.1",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"typeCoverage": {
|
|
70
70
|
"atLeast": 93.99
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "e6cde482e02072514bda74657b7e1a6928b1e8ec"
|
|
73
73
|
}
|
package/src/offerWatcher.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function watchOfferOutcomes(watchers: OutcomeWatchers, seat: UserSeat): Promise<[unknown, 0 | 1, PaymentPKeywordRecord]>;
|
|
2
|
-
export function prepareOfferWatcher(baggage: import('@agoric/vat-data').Baggage): (walletHelper: any, deposit: any, offerSpec:
|
|
2
|
+
export function prepareOfferWatcher(baggage: import('@agoric/vat-data').Baggage): (walletHelper: any, deposit: any, offerSpec: OfferSpec, address: string, invitationAmount: globalThis.Amount<"set">, seatRef: UserSeat<unknown>) => import("@endo/exo").GuardedKit<{
|
|
3
3
|
helper: {
|
|
4
4
|
/**
|
|
5
5
|
* @param {Record<string, unknown>} offerStatusUpdates
|
|
@@ -29,16 +29,13 @@ export function prepareOfferWatcher(baggage: import('@agoric/vat-data').Baggage)
|
|
|
29
29
|
/** @type {OutcomeWatchers['numWantsWatcher']} */
|
|
30
30
|
numWantsWatcher: OutcomeWatchers['numWantsWatcher'];
|
|
31
31
|
}>;
|
|
32
|
-
export type OfferStatus = import('./offers.js').OfferSpec & {
|
|
33
|
-
error?: string;
|
|
34
|
-
numWantsSatisfied?: number;
|
|
35
|
-
result?: unknown | typeof import('./offers.js').UNPUBLISHED_RESULT;
|
|
36
|
-
payouts?: AmountKeywordRecord;
|
|
37
|
-
};
|
|
38
32
|
/**
|
|
39
33
|
* <T, [UserSeat]
|
|
40
34
|
*/
|
|
41
|
-
export type OfferPromiseWatcher<T extends unknown> =
|
|
35
|
+
export type OfferPromiseWatcher<T extends unknown> = {
|
|
36
|
+
onFulfilled?: ((value: T, args_0: UserSeat<unknown>) => void) | undefined;
|
|
37
|
+
onRejected?: ((reason: unknown, args_0: UserSeat<unknown>) => void) | undefined;
|
|
38
|
+
};
|
|
42
39
|
export type OutcomeWatchers = {
|
|
43
40
|
resultWatcher: OfferPromiseWatcher<unknown>;
|
|
44
41
|
numWantsWatcher: OfferPromiseWatcher<number>;
|
|
@@ -46,4 +43,5 @@ export type OutcomeWatchers = {
|
|
|
46
43
|
};
|
|
47
44
|
export type MakeOfferWatcher = ReturnType<typeof prepareOfferWatcher>;
|
|
48
45
|
export type OfferWatcher = ReturnType<MakeOfferWatcher>;
|
|
46
|
+
import type { OfferSpec } from "./offers.js";
|
|
49
47
|
//# 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":"AAgEO,6CAHI,eAAe,QACf,QAAQ,oDAQlB;AAkCM,6CAFI,OAAO,kBAAkB,EAAE,OAAO;;QA0BrC;;WAEG;yCADQ,OAAO,MAAM,EAAE,OAAO,CAAC;QAQlC;;;;;WAKG;sCAJQ,MAAM,oBACN,OAAO,KAAK,CAAC,oBACb,OAAO,YAAY,EAAE,gBAAgB,qBACrC,OAAO,YAAY,EAAE,iBAAiB;QAkBjD,8BAA8B;8BAAlB,OAAO;QAqCnB;;;;;WAKG;yBADQ,KAAK;;IAclB,gDAAgD;oBAArC,eAAe,CAAC,gBAAgB,CAAC;IA6B5C,+CAA+C;mBAApC,eAAe,CAAC,eAAe,CAAC;IAsB3C,iDAAiD;qBAAtC,eAAe,CAAC,iBAAiB,CAAC;GA0BlD;;;;;;;;8BA5QY;IACZ,aAAe,EAAE,oBAAoB,OAAO,CAAC,CAAC;IAC9C,eAAiB,EAAE,oBAAoB,MAAM,CAAC,CAAC;IAC/C,cAAgB,EAAE,oBAAoB,qBAAqB,CAAC,CAAC;CAC1D;+BA2QU,WAAW,0BAA0B,CAAC;2BACtC,WAAW,gBAAgB,CAAC;+BAzRb,aAAa"}
|
package/src/offerWatcher.js
CHANGED
|
@@ -12,18 +12,12 @@ import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
|
|
|
12
12
|
|
|
13
13
|
import { UNPUBLISHED_RESULT } from './offers.js';
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
* error?: string,
|
|
18
|
-
* numWantsSatisfied?: number
|
|
19
|
-
* result?: unknown | typeof import('./offers.js').UNPUBLISHED_RESULT,
|
|
20
|
-
* payouts?: AmountKeywordRecord,
|
|
21
|
-
* }} OfferStatus
|
|
22
|
-
*/
|
|
15
|
+
/** @import {OfferSpec} from "./offers.js" */
|
|
16
|
+
/** @import {PromiseWatcher} from '@agoric/swingset-liveslots' */
|
|
23
17
|
|
|
24
18
|
/**
|
|
25
19
|
* @template {any} T
|
|
26
|
-
* @typedef {
|
|
20
|
+
* @typedef {PromiseWatcher<T, [UserSeat]>} OfferPromiseWatcher<T, [UserSeat]
|
|
27
21
|
*/
|
|
28
22
|
|
|
29
23
|
/**
|
|
@@ -117,7 +111,7 @@ export const prepareOfferWatcher = baggage => {
|
|
|
117
111
|
*
|
|
118
112
|
* @param {*} walletHelper
|
|
119
113
|
* @param {*} deposit
|
|
120
|
-
* @param {
|
|
114
|
+
* @param {OfferSpec} offerSpec
|
|
121
115
|
* @param {string} address
|
|
122
116
|
* @param {Amount<'set'>} invitationAmount
|
|
123
117
|
* @param {UserSeat} seatRef
|
package/src/offers.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type OfferSpec = {
|
|
|
18
18
|
proposal: Proposal;
|
|
19
19
|
offerArgs?: unknown;
|
|
20
20
|
};
|
|
21
|
-
export type OfferStatus =
|
|
21
|
+
export type OfferStatus = OfferSpec & {
|
|
22
22
|
error?: string;
|
|
23
23
|
numWantsSatisfied?: number;
|
|
24
24
|
result?: unknown | typeof UNPUBLISHED_RESULT;
|
package/src/offers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["offers.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AAEH,kEAAkE;AAClE,+CAAgD;sBAbnC,MAAM,GAAG,MAAM;wBAIf;IACZ,EAAM,EAAE,OAAO,CAAC;IAChB,cAAkB,EAAE,OAAO,kBAAkB,EAAE,cAAc,CAAC;IAC9D,QAAY,EAAE,QAAQ,CAAC;IACvB,SAAa,CAAC,EAAE,OAAO,CAAA;CACpB;0BAOS,
|
|
1
|
+
{"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["offers.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AAEH,kEAAkE;AAClE,+CAAgD;sBAbnC,MAAM,GAAG,MAAM;wBAIf;IACZ,EAAM,EAAE,OAAO,CAAC;IAChB,cAAkB,EAAE,OAAO,kBAAkB,EAAE,cAAc,CAAC;IAC9D,QAAY,EAAE,QAAQ,CAAC;IACvB,SAAa,CAAC,EAAE,OAAO,CAAA;CACpB;0BAOS,SAAS,GAAG;IACxB,KAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,MAAQ,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAC;IAC/C,OAAS,CAAC,EAAE,mBAAmB,CAAC;CAC7B"}
|
package/src/offers.js
CHANGED