@agoric/wallet-backend 0.14.4-dev-727e4af.0 → 0.14.4-dev-96c9ff5.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-wallet-js-meta.json +234 -229
- package/bundles/bundle-wallet.js +1 -1
- package/package.json +21 -21
- package/src/internal-types.js +5 -2
- package/src/lib-dehydrate.js +6 -7
- package/src/lib-wallet.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/wallet-backend",
|
|
3
|
-
"version": "0.14.4-dev-
|
|
3
|
+
"version": "0.14.4-dev-96c9ff5.0+96c9ff5",
|
|
4
4
|
"description": "Wallet backend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -14,28 +14,28 @@
|
|
|
14
14
|
"lint:eslint": "eslint ."
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@agoric/vats": "0.15.2-dev-
|
|
18
|
-
"@endo/bundle-source": "^3.2.
|
|
19
|
-
"@endo/far": "^1.1.
|
|
20
|
-
"@endo/init": "^1.1.
|
|
17
|
+
"@agoric/vats": "0.15.2-dev-96c9ff5.0+96c9ff5",
|
|
18
|
+
"@endo/bundle-source": "^3.2.3",
|
|
19
|
+
"@endo/far": "^1.1.2",
|
|
20
|
+
"@endo/init": "^1.1.2",
|
|
21
21
|
"ava": "^5.3.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agoric/assert": "0.6.1-dev-
|
|
25
|
-
"@agoric/cache": "0.3.3-dev-
|
|
26
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
27
|
-
"@agoric/internal": "0.3.3-dev-
|
|
28
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
29
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
30
|
-
"@agoric/store": "0.9.3-dev-
|
|
31
|
-
"@agoric/time": "0.3.3-dev-
|
|
32
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
33
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
-
"@agoric/zone": "0.2.3-dev-
|
|
35
|
-
"@endo/eventual-send": "^1.2.
|
|
36
|
-
"@endo/marshal": "^1.
|
|
37
|
-
"@endo/nat": "^5.0.
|
|
38
|
-
"@endo/promise-kit": "^1.1.
|
|
24
|
+
"@agoric/assert": "0.6.1-dev-96c9ff5.0+96c9ff5",
|
|
25
|
+
"@agoric/cache": "0.3.3-dev-96c9ff5.0+96c9ff5",
|
|
26
|
+
"@agoric/ertp": "0.16.3-dev-96c9ff5.0+96c9ff5",
|
|
27
|
+
"@agoric/internal": "0.3.3-dev-96c9ff5.0+96c9ff5",
|
|
28
|
+
"@agoric/notifier": "0.6.3-dev-96c9ff5.0+96c9ff5",
|
|
29
|
+
"@agoric/smart-wallet": "0.5.4-dev-96c9ff5.0+96c9ff5",
|
|
30
|
+
"@agoric/store": "0.9.3-dev-96c9ff5.0+96c9ff5",
|
|
31
|
+
"@agoric/time": "0.3.3-dev-96c9ff5.0+96c9ff5",
|
|
32
|
+
"@agoric/vat-data": "0.5.3-dev-96c9ff5.0+96c9ff5",
|
|
33
|
+
"@agoric/zoe": "0.26.3-dev-96c9ff5.0+96c9ff5",
|
|
34
|
+
"@agoric/zone": "0.2.3-dev-96c9ff5.0+96c9ff5",
|
|
35
|
+
"@endo/eventual-send": "^1.2.2",
|
|
36
|
+
"@endo/marshal": "^1.5.0",
|
|
37
|
+
"@endo/nat": "^5.0.7",
|
|
38
|
+
"@endo/promise-kit": "^1.1.2",
|
|
39
39
|
"import-meta-resolve": "^2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [],
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"typeCoverage": {
|
|
66
66
|
"atLeast": 0
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "96c9ff577fe14cebeb5a38543ba7f8598ffcd0c7"
|
|
69
69
|
}
|
package/src/internal-types.js
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* @property {PurseActions} actions
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @import {Petname} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
12
|
+
* @import {Key} from '@endo/patterns';
|
|
13
|
+
*/
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* @typedef {PursesJSONState & PursesAddedState} PursesFullState
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
*/
|
|
52
55
|
|
|
53
56
|
/**
|
|
54
|
-
* @template T
|
|
57
|
+
* @template {Key} T
|
|
55
58
|
* @typedef {object} Mapping
|
|
56
59
|
* @property {(petname: Petname) => string} implode
|
|
57
60
|
* @property {(str: string) => Petname} explode
|
package/src/lib-dehydrate.js
CHANGED
|
@@ -86,10 +86,9 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* @template T
|
|
90
89
|
* @param {string} kind
|
|
91
90
|
* @param {{ useLegacyMap?: boolean }} [legacyOptions]
|
|
92
|
-
* @returns {Mapping<
|
|
91
|
+
* @returns {Mapping<any>}
|
|
93
92
|
*/
|
|
94
93
|
const makeMapping = (kind, { useLegacyMap = false } = {}) => {
|
|
95
94
|
typeof kind === 'string' || `kind ${kind} must be a string`;
|
|
@@ -97,9 +96,9 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
97
96
|
// These are actually either a LegacyMap or a MapStore depending on
|
|
98
97
|
// useLegacyMap. Fortunately, the LegacyMap type is approximately the
|
|
99
98
|
// intersection of these, so we can just use it.
|
|
100
|
-
/** @type {LegacyMap<
|
|
99
|
+
/** @type {LegacyMap<any, string>} */
|
|
101
100
|
const rawValToPetname = makeMap('value');
|
|
102
|
-
/** @type {LegacyMap<
|
|
101
|
+
/** @type {LegacyMap<any, string | Path>} */
|
|
103
102
|
const valToPetname = {
|
|
104
103
|
...rawValToPetname,
|
|
105
104
|
set(key, val) {
|
|
@@ -121,9 +120,9 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
121
120
|
return mapIterable(rawValToPetname.values(), val => explode(val));
|
|
122
121
|
},
|
|
123
122
|
};
|
|
124
|
-
/** @type {MapStore<string,
|
|
123
|
+
/** @type {MapStore<string, any>} */
|
|
125
124
|
const rawPetnameToVal = makeScalarMapStore('petname');
|
|
126
|
-
/** @type {MapStore<Path | string,
|
|
125
|
+
/** @type {MapStore<Path | string, any>} */
|
|
127
126
|
const petnameToVal = {
|
|
128
127
|
...rawPetnameToVal,
|
|
129
128
|
init(key, val) {
|
|
@@ -270,7 +269,7 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
270
269
|
petnameToVal.delete(petname);
|
|
271
270
|
valToPetname.delete(val);
|
|
272
271
|
};
|
|
273
|
-
/** @type {Mapping<
|
|
272
|
+
/** @type {Mapping<any>} */
|
|
274
273
|
const mapping = harden({
|
|
275
274
|
implode,
|
|
276
275
|
explode,
|
package/src/lib-wallet.js
CHANGED
|
@@ -754,7 +754,9 @@ export function makeWalletRoot({
|
|
|
754
754
|
* @param {string} [address]
|
|
755
755
|
*/
|
|
756
756
|
const addContact = async (petname, actions, address = undefined) => {
|
|
757
|
+
// @ts-expect-error XXX ERef
|
|
757
758
|
const already = await E(board).has(actions);
|
|
759
|
+
/** @type {any} */
|
|
758
760
|
let depositFacet;
|
|
759
761
|
if (already) {
|
|
760
762
|
depositFacet = actions;
|