@agoric/smart-wallet 0.5.4-dev-57802f9.0 → 0.5.4-other-dev-1f26562.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/CHANGELOG.md ADDED
@@ -0,0 +1,180 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ### [0.5.4-u11.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.3...@agoric/smart-wallet@0.5.4-u11.0) (2023-08-24)
7
+
8
+ **Note:** Version bump only for package @agoric/smart-wallet
9
+
10
+
11
+
12
+
13
+
14
+ ### [0.5.3](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.2...@agoric/smart-wallet@0.5.3) (2023-06-09)
15
+
16
+ **Note:** Version bump only for package @agoric/smart-wallet
17
+
18
+
19
+
20
+
21
+
22
+ ### [0.5.2](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.1...@agoric/smart-wallet@0.5.2) (2023-06-02)
23
+
24
+ **Note:** Version bump only for package @agoric/smart-wallet
25
+
26
+
27
+
28
+
29
+
30
+ ### [0.5.1](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.0...@agoric/smart-wallet@0.5.1) (2023-05-24)
31
+
32
+ **Note:** Version bump only for package @agoric/smart-wallet
33
+
34
+
35
+
36
+
37
+
38
+ ## [0.5.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.2...@agoric/smart-wallet@0.5.0) (2023-05-19)
39
+
40
+
41
+ ### ⚠ BREAKING CHANGES
42
+
43
+ * emit smallcaps-format data in all marshallers
44
+ * move PublicTopic to Zoe contractSupport
45
+ * **wallet:** reject executeOffer on failure
46
+ * storage paths by getPublicTopics
47
+ * rename 'fit' to 'mustMatch'
48
+
49
+ ### Features
50
+
51
+ * emit smallcaps-format data in all marshallers ([1753df8](https://github.com/Agoric/agoric/commit/1753df83465785b5ee71b250770c9b012d750ffc)), closes [#6822](https://github.com/Agoric/agoric/issues/6822)
52
+ * **board-utils:** BoardRemote like Remotables ([3aa44de](https://github.com/Agoric/agoric/commit/3aa44debbdc955892611ba870478fb088395cf10))
53
+ * **smartWallet:** fail early on offerId re-use ([08307e0](https://github.com/Agoric/agoric/commit/08307e01a6c9a3d53144df55f52e03f8f9df2a78))
54
+ * Add incarnation number to the transcript store records ([5d64be7](https://github.com/Agoric/agoric/commit/5d64be7aa1fd222822b145240f541f5eabb01c43)), closes [#7482](https://github.com/Agoric/agoric/issues/7482)
55
+ * **contractSupport:** provideAll takes thunks ([f35034b](https://github.com/Agoric/agoric/commit/f35034b13b99dbfb8d472816644e09f9b4f2be3a))
56
+ * **contractSupport:** providePublicTopic ([5bdb71e](https://github.com/Agoric/agoric/commit/5bdb71e1af9ecde163322612de3e648fd75d7a47))
57
+ * **smart-wallet:** exit offer ([7323023](https://github.com/Agoric/agoric/commit/7323023308aa40c145e60093b7fc52580534cd2d))
58
+ * **smart-wallet:** preserve existing `myAddressNameAdmin` ([8f283af](https://github.com/Agoric/agoric/commit/8f283aff0fc7b6146e9b6393c158cd9ca15f31f9))
59
+ * **smart-wallet:** publish pending offers before completion ([c913b36](https://github.com/Agoric/agoric/commit/c913b36950be1d2ae1b16d16bfcfc8df32305e0c))
60
+ * **smart-wallet:** publish possibly exitable offers ([de0170a](https://github.com/Agoric/agoric/commit/de0170add5bd4c82cbef23431bffaa95f7007880))
61
+ * **topics:** makePublicTopic ([c8b464c](https://github.com/Agoric/agoric/commit/c8b464c26c53535097e4df573e126c81e00e5aa6))
62
+ * **vats:** Scoped bridge managers ([11f6429](https://github.com/Agoric/agoric/commit/11f64298d8529cca249d2933894236dc534dfe3e))
63
+ * **wallet:** executeOffer throw errors ([224dbca](https://github.com/Agoric/agoric/commit/224dbca918343608d53f691a448171c8a48d283e))
64
+ * **wallet:** record bridge errors to vstorage ([f8581e9](https://github.com/Agoric/agoric/commit/f8581e95311f7cb4105f6d81f0ac7b6a9121b68f))
65
+ * **wallet:** reject executeOffer on failure ([308caab](https://github.com/Agoric/agoric/commit/308caab24c1680c2c7910eff8128f9089dedf26d))
66
+ * **walletFactory:** more durability ([7e6c98d](https://github.com/Agoric/agoric/commit/7e6c98d4a448eb94de98c865bc8280534bd5069f))
67
+ * **walletFactory:** upgradable ([ca30e05](https://github.com/Agoric/agoric/commit/ca30e05988fae00f437b5708dbabe061742797f1))
68
+ * agoricContract invitation getter ([ca6166f](https://github.com/Agoric/agoric/commit/ca6166f94a934811f698631f9ce1dd2a32ad422c))
69
+ * allow string for offer id, leave uniqueness to client ([7856e56](https://github.com/Agoric/agoric/commit/7856e5635ba04671da17334080dad061a8f9fc15))
70
+ * boot-oracles ([ce8f8de](https://github.com/Agoric/agoric/commit/ce8f8de65ad4c14b4e8d699cd721683cfa1cc495))
71
+ * durable smart wallet ([6977f73](https://github.com/Agoric/agoric/commit/6977f73f820a9345ef49f4f18095a5c88af06729))
72
+ * fixed heap for getPublicTopics ([1886c3a](https://github.com/Agoric/agoric/commit/1886c3af2319b9540faa318cf6179d4d01eec084))
73
+ * storage paths by getPublicTopics ([40a8624](https://github.com/Agoric/agoric/commit/40a8624240f241a686c28bd7d7c7ef1ef780f984))
74
+ * support TopicsRecord ([8618461](https://github.com/Agoric/agoric/commit/8618461781fe11f28e6b891a4d31ebfd9dda5e0d))
75
+ * track publicSubscribers ([30cae51](https://github.com/Agoric/agoric/commit/30cae513a624a74f2df05b668f4eaa02d6d13656))
76
+ * vaults list command ([894c92f](https://github.com/Agoric/agoric/commit/894c92f9ee6331aba43aaeebd6c007dd03d53996))
77
+
78
+
79
+ ### Bug Fixes
80
+
81
+ * handle {} wallet update records ([c7dbccb](https://github.com/Agoric/agoric/commit/c7dbccbad2d2007af398c31c94f68793fe4e8504))
82
+ * **cli:** dont blow up from old wallet updates ([ac5a28e](https://github.com/Agoric/agoric/commit/ac5a28e9e47916b0d3ba7978d90067a757470be3))
83
+ * **walletFactory:** handle restartContract ([f8b7200](https://github.com/Agoric/agoric/commit/f8b720014c2987301a67d073348b80fc1d30d756))
84
+ * Improve the smart wallet revival handshake ([69ec2e7](https://github.com/Agoric/agoric/commit/69ec2e76f06cf87454d087adfa2ef6c2adcea8a0))
85
+ * **vats:** Extract revivable wallet addresses from the correct chain storage path ([2454d3f](https://github.com/Agoric/agoric/commit/2454d3f48eefb2bdea5a0d03a250d8a5a74b0ba3))
86
+ * add missing facet interface ([d16bc2e](https://github.com/Agoric/agoric/commit/d16bc2e121810c8c432519028e4382146b066956))
87
+ * bootstrap handles BundleIDs, not full bundles ([de8b0f5](https://github.com/Agoric/agoric/commit/de8b0f5d35e0938fa00d795d11cfad3acadd9428)), closes [#6826](https://github.com/Agoric/agoric/issues/6826) [#4374](https://github.com/Agoric/agoric/issues/4374)
88
+ * number/string inconsistency with offer lookup ([59abbdb](https://github.com/Agoric/agoric/commit/59abbdb0a6498333ec48e971347076f7739c9b84))
89
+ * Preserve smart wallets through bulldozer upgrade ([160bf6c](https://github.com/Agoric/agoric/commit/160bf6cad0bbdfe6a245f6b7a8e260d244c44f21)), closes [#7537](https://github.com/Agoric/agoric/issues/7537)
90
+ * use `subscribeEach` to get reconnect benefits ([fb24132](https://github.com/Agoric/agoric/commit/fb24132f9b4e117e56bae2803994e57c188344f3))
91
+ * **wallet:** pipeTopicToStorage with Recorder kit ([31b79b7](https://github.com/Agoric/agoric/commit/31b79b71eda59b62d3bacd7ca648b53b9385afc0))
92
+ * **wallet:** recording handleBridgeAction errors ([8e64158](https://github.com/Agoric/agoric/commit/8e6415872dafc1cd5def9c038d673842464b316b))
93
+ * multiple deposits of unknown brand ([6ef6062](https://github.com/Agoric/agoric/commit/6ef6062a4b69b0d44b18dc576021bbbaf372b3b2))
94
+ * purse making (use vbank) ([9175882](https://github.com/Agoric/agoric/commit/91758824848ea24f5cd4cae5eaadf88169b80e39))
95
+ * race in watchPurse to update balance ([51869c1](https://github.com/Agoric/agoric/commit/51869c1ffce90350cbaed84b5f92fa05c3473f3e))
96
+ * rename from FarClass to ExoClass, etc ([#6323](https://github.com/Agoric/agoric/issues/6323)) ([da96c7c](https://github.com/Agoric/agoric/commit/da96c7c3c902a5e266baeedf23df02481f2e9c9d))
97
+ * **smart-wallet:** create purses for new assets lazily ([e241ba0](https://github.com/Agoric/agoric/commit/e241ba03a7d9f441436b3d987f9327060d7dd8ce))
98
+
99
+
100
+ ### Miscellaneous Chores
101
+
102
+ * rename 'fit' to 'mustMatch' ([9fa3232](https://github.com/Agoric/agoric/commit/9fa32324f84bfb85de9e99e0c9ad277b8017b50e)), closes [#6844](https://github.com/Agoric/agoric/issues/6844)
103
+
104
+
105
+ ### Code Refactoring
106
+
107
+ * move PublicTopic to Zoe contractSupport ([c51ea3d](https://github.com/Agoric/agoric/commit/c51ea3de22f50e05fcc1aaabd2108e785d51eb2e))
108
+
109
+
110
+
111
+ ### [0.4.4](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.3...@agoric/smart-wallet@0.4.4) (2023-02-17)
112
+
113
+ **Note:** Version bump only for package @agoric/smart-wallet
114
+
115
+
116
+
117
+
118
+
119
+ ### [0.4.3](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.2...@agoric/smart-wallet@0.4.3) (2022-12-14)
120
+
121
+ **Note:** Version bump only for package @agoric/smart-wallet
122
+
123
+
124
+
125
+
126
+
127
+ ### [0.4.2](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.1...@agoric/smart-wallet@0.4.2) (2022-10-18)
128
+
129
+ **Note:** Version bump only for package @agoric/smart-wallet
130
+
131
+
132
+
133
+
134
+
135
+ ### [0.4.1](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.0...@agoric/smart-wallet@0.4.1) (2022-10-08)
136
+
137
+ **Note:** Version bump only for package @agoric/smart-wallet
138
+
139
+
140
+
141
+
142
+
143
+ ## [0.4.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.3.0...@agoric/smart-wallet@0.4.0) (2022-10-05)
144
+
145
+
146
+ ### Features
147
+
148
+ * **cli:** use new wallet.current node ([71effe7](https://github.com/Agoric/agoric/commit/71effe758c28181b8709ae4ccf025fcec7bb8a38))
149
+ * track consumed invitation amounts ([e9e3c35](https://github.com/Agoric/agoric/commit/e9e3c35cebdc85e80fb2eaa117ff0be00d26c9bb))
150
+ * **cli:** show status of invitations ([8506e6d](https://github.com/Agoric/agoric/commit/8506e6d87ef331e781c9d2e2251fdcf48e784e04))
151
+
152
+
153
+ ### Bug Fixes
154
+
155
+ * **vats:** handle duplicate provision requests ([#6307](https://github.com/Agoric/agoric/issues/6307)) ([05d405d](https://github.com/Agoric/agoric/commit/05d405d5409e1f80612bb002234f5a9c3910a7df))
156
+ * **wallet-ui:** detect unprovisioned wallet ([1747d57](https://github.com/Agoric/agoric/commit/1747d5781f4ee594eca1ded76af4944c405e7000))
157
+
158
+
159
+
160
+ ## 0.3.0 (2022-09-20)
161
+
162
+
163
+ ### Features
164
+
165
+ * **wallet:** more diagnostics for invitation match ([98630ee](https://github.com/Agoric/agoric/commit/98630ee96a202cf3907e37b5d4d549bb37b1263d))
166
+ * **wallet-ui:** start displaying balances ([0f36da9](https://github.com/Agoric/agoric/commit/0f36da99daef86f24670d606ae5fd1adb32b419b))
167
+ * ensure voting via PSMCharter works with a unit test ([#6167](https://github.com/Agoric/agoric/issues/6167)) ([ff9471b](https://github.com/Agoric/agoric/commit/ff9471bf3a90ffab050e8b659d64d4cbd7c2d764))
168
+ * **smart-wallet:** include lastOfferId in error ([932cb7d](https://github.com/Agoric/agoric/commit/932cb7d90b8e281f0922d0b38287230aabd6f535))
169
+ * **smartWallet:** defer deposits until purse available ([#6172](https://github.com/Agoric/agoric/issues/6172)) ([1a1cc41](https://github.com/Agoric/agoric/commit/1a1cc41d421760563892212e1ca3df237a7a6661))
170
+ * **smartWallet:** virtual objects ([659ad58](https://github.com/Agoric/agoric/commit/659ad58349f972881a540d78ec5d856872dacc7d))
171
+ * distribute PSM Charter Invitatitons ([#6166](https://github.com/Agoric/agoric/issues/6166)) ([50cd3e2](https://github.com/Agoric/agoric/commit/50cd3e240fb33079948fa03b32bda86276879b4a))
172
+ * new Smart Wallet ([708972f](https://github.com/Agoric/agoric/commit/708972f1f531c9ea5e346f833c6d253efe80f837))
173
+
174
+
175
+ ### Bug Fixes
176
+
177
+ * **smart-wallet:** invitation brand is remote ([6613136](https://github.com/Agoric/agoric/commit/66131366f563ebfefbeabeecffda43211a093d1e))
178
+ * **smart-wallet:** not yet durable-able ([db66c2c](https://github.com/Agoric/agoric/commit/db66c2c13de92f2a0783bcaf174223691ab0a339))
179
+ * Fix test failures in packages other than "vats" ([364815b](https://github.com/Agoric/agoric/commit/364815b88429e3443734681b5b0771b7d824ebe8))
180
+ * two corrections we found by demoing on 6084 ([#6155](https://github.com/Agoric/agoric/issues/6155)) ([88b1067](https://github.com/Agoric/agoric/commit/88b10676b9617e662fed38df61ab3210df07c602))
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
2
  "name": "@agoric/smart-wallet",
3
- "version": "0.5.4-dev-57802f9.0+57802f9",
3
+ "version": "0.5.4-other-dev-1f26562.0+1f26562",
4
4
  "description": "Wallet contract",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "yarn build:bundles",
8
8
  "build:bundles": "node ./scripts/build-bundles.js",
9
- "prepack": "tsc --build tsconfig.build.json",
9
+ "prepack": "tsc --build jsconfig.build.json",
10
10
  "postpack": "git clean -f '*.d.ts*'",
11
11
  "test": "ava",
12
12
  "test:xs": "exit 0",
13
13
  "lint": "run-s --continue-on-error lint:*",
14
14
  "lint-fix": "yarn lint:eslint --fix",
15
- "lint:types": "tsc",
15
+ "lint:types": "tsc -p jsconfig.json",
16
16
  "lint:eslint": "eslint ."
17
17
  },
18
18
  "devDependencies": {
19
- "@agoric/cosmic-proto": "0.3.1-dev-57802f9.0+57802f9",
20
- "@agoric/swingset-vat": "0.32.3-dev-57802f9.0+57802f9",
21
- "@endo/bundle-source": "^2.7.0",
22
- "@endo/captp": "^3.1.4",
23
- "@endo/init": "^0.5.59",
24
- "ava": "^5.3.0",
19
+ "@agoric/cosmic-proto": "0.3.1-other-dev-1f26562.0+1f26562",
20
+ "@endo/bundle-source": "2.5.2-upstream-rollup",
21
+ "@endo/captp": "3.1.1",
22
+ "@endo/init": "0.5.56",
23
+ "ava": "^5.2.0",
25
24
  "import-meta-resolve": "^2.2.1"
26
25
  },
27
26
  "dependencies": {
28
- "@agoric/assert": "0.6.1-dev-57802f9.0+57802f9",
29
- "@agoric/casting": "0.4.3-dev-57802f9.0+57802f9",
30
- "@agoric/ertp": "0.16.3-dev-57802f9.0+57802f9",
31
- "@agoric/internal": "0.3.3-dev-57802f9.0+57802f9",
32
- "@agoric/notifier": "0.6.3-dev-57802f9.0+57802f9",
33
- "@agoric/store": "0.9.3-dev-57802f9.0+57802f9",
34
- "@agoric/vat-data": "0.5.3-dev-57802f9.0+57802f9",
35
- "@agoric/vats": "0.15.2-dev-57802f9.0+57802f9",
36
- "@agoric/zoe": "0.26.3-dev-57802f9.0+57802f9",
37
- "@endo/eventual-send": "^0.17.5",
38
- "@endo/far": "^0.2.21",
39
- "@endo/marshal": "^0.8.8",
40
- "@endo/nat": "^4.1.30",
41
- "@endo/promise-kit": "^0.2.59"
27
+ "@agoric/assert": "0.6.1-other-dev-1f26562.0+1f26562",
28
+ "@agoric/casting": "0.4.3-other-dev-1f26562.0+1f26562",
29
+ "@agoric/ertp": "0.16.3-other-dev-1f26562.0+1f26562",
30
+ "@agoric/internal": "0.3.3-other-dev-1f26562.0+1f26562",
31
+ "@agoric/notifier": "0.6.3-other-dev-1f26562.0+1f26562",
32
+ "@agoric/store": "0.9.3-other-dev-1f26562.0+1f26562",
33
+ "@agoric/swingset-vat": "0.32.3-other-dev-1f26562.0+1f26562",
34
+ "@agoric/vat-data": "0.5.3-other-dev-1f26562.0+1f26562",
35
+ "@agoric/vats": "0.15.2-other-dev-1f26562.0+1f26562",
36
+ "@agoric/zoe": "0.26.3-other-dev-1f26562.0+1f26562",
37
+ "@endo/eventual-send": "0.17.2",
38
+ "@endo/far": "0.2.18",
39
+ "@endo/marshal": "0.8.5",
40
+ "@endo/nat": "4.1.27",
41
+ "@endo/promise-kit": "0.2.56"
42
42
  },
43
43
  "files": [
44
44
  "src/"
@@ -58,13 +58,10 @@
58
58
  "files": [
59
59
  "test/**/test-*.js"
60
60
  ],
61
- "require": [
62
- "@endo/init/debug.js"
63
- ],
64
61
  "timeout": "2m"
65
62
  },
66
63
  "publishConfig": {
67
64
  "access": "public"
68
65
  },
69
- "gitHead": "57802f970619d66d45608e819f443131e3bf6b66"
66
+ "gitHead": "1f265627270d514ab48943f86c668eb58a280552"
70
67
  }
@@ -1,4 +1,4 @@
1
- export function makeInvitationsHelper(zoe: ERef<ZoeService>, agoricNames: ERef<import('@agoric/vats').NameHub>, invitationBrand: Brand<'set'>, invitationsPurse: Purse<'set'>, getInvitationContinuation: (fromOfferId: string) => import('./types').InvitationMakers): (spec: InvitationSpec) => ERef<Invitation>;
1
+ export function makeInvitationsHelper(zoe: ERef<ZoeService>, agoricNames: ERef<NameHub>, invitationBrand: Brand<'set'>, invitationsPurse: Purse<'set'>, getInvitationContinuation: (fromOfferId: string) => import('./types').RemoteInvitationMakers): (spec: InvitationSpec) => ERef<Invitation>;
2
2
  /**
3
3
  * Specify how to produce an invitation. See each type in the union for details.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["invitations.js"],"names":[],"mappings":"AAkEO,2CANI,KAAK,UAAU,CAAC,eAChB,KAAK,OAAO,cAAc,EAAE,OAAO,CAAC,mBACpC,MAAM,KAAK,CAAC,oBACZ,MAAM,KAAK,CAAC,2CACE,MAAM,KAAK,OAAO,SAAS,EAAE,gBAAgB,UAsFlD,cAAc,KAAK,KAAK,UAAU,CAAC,CAgBtD;;;;6BAvJY,4BAA4B,GAAG,sBAAsB,GAAG,mBAAmB,GAA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ACZ,MAAQ,EAAE,UAAU,CAAC;IACrB,QAAU,EAAE,QAAQ,CAAC;IACrB,qBAAuB,EAAE,MAAM,CAAC;IAChC,cAAgB,CAAC,EAAE,GAAG,EAAE,CAAC;CACtB;;;;;kCAGS;IACZ,MAAQ,EAAE,OAAO,CAAC;IAClB,QAAU,EAAE,QAAQ,CAAC;IACrB,WAAa,EAAE,MAAM,CAAC;CACnB;;;;uCAIS;IACZ,MAAQ,EAAE,YAAY,CAAC;IACvB,aAAe,EAAE,OAAO,aAAa,EAAE,OAAO,CAAC;IAC/C,mBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAgB,CAAC,EAAE,GAAG,EAAE,CAAC;CACtB;oCAKS,KAAK,iBAAiB,EAAE,aAAa,GAAG,UAAU,CAAC"}
@@ -59,10 +59,10 @@ const MAX_PIPE_LENGTH = 2;
59
59
 
60
60
  /**
61
61
  * @param {ERef<ZoeService>} zoe
62
- * @param {ERef<import('@agoric/vats').NameHub>} agoricNames
62
+ * @param {ERef<NameHub>} agoricNames
63
63
  * @param {Brand<'set'>} invitationBrand
64
64
  * @param {Purse<'set'>} invitationsPurse
65
- * @param {(fromOfferId: string) => import('./types').InvitationMakers} getInvitationContinuation
65
+ * @param {(fromOfferId: string) => import('./types').RemoteInvitationMakers} getInvitationContinuation
66
66
  */
67
67
  export const makeInvitationsHelper = (
68
68
  zoe,
package/src/offers.d.ts CHANGED
@@ -20,10 +20,10 @@ export function makeOfferExecutor({ zoe, depositFacet, invitationIssuer, powers,
20
20
  powers: {
21
21
  logger: Pick<Console, 'info' | 'error'>;
22
22
  invitationFromSpec: (spec: import('./invitations').InvitationSpec) => ERef<Invitation>;
23
- purseForBrand: (brand: Brand) => Promise<Purse>;
23
+ purseForBrand: (brand: Brand) => Promise<import('./types').RemotePurse>;
24
24
  };
25
25
  onStatusChange: (status: OfferStatus) => void;
26
- onNewContinuingOffer: (offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').InvitationMakers, publicSubscribers: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord) => Promise<void>;
26
+ onNewContinuingOffer: (offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').RemoteInvitationMakers, publicSubscribers: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord) => Promise<void>;
27
27
  }): {
28
28
  /**
29
29
  * Take an offer description provided in capData, augment it with payments and call zoe.offer()
@@ -1 +1 @@
1
- {"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["offers.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;;;GAOG;AAEH,kEAAkE;AAClE,+CAAgD;AAwBzC;SAVI,KAAK,UAAU,CAAC;;mCACW,QAAQ,MAAM,CAAC;;sBAC1C,KAAK,OAAO,KAAK,CAAC,CAAC;;gBAEnB,KAAK,OAAO,EAAE,MAAM,GAAE,OAAO,CAAC;mCACvB,OAAO,eAAe,EAAE,cAAc,KAAK,KAAK,UAAU,CAAC;+BAC1D,KAAK,KAAK,QAAQ,KAAK,CAAC;;6BACvB,WAAW,KAAK,IAAI;oCACnB,MAAM,oBAAoB,OAAO,KAAK,CAAC,oBAAoB,OAAO,SAAS,EAAE,gBAAgB,qBAAqB,OAAO,SAAS,EAAE,iBAAiB,GAAG,OAAO,iCAAiC,EAAE,YAAY,KAAM,QAAQ,IAAI,CAAC;;IAalP;;;;;;;OAOG;4BAJQ,SAAS,2BACC,QAAQ,KAAK,IAAI,GACzB,QAAQ,IAAI,CAAC;EAwI7B;sBA7LY,MAAM,GAAG,MAAM;wBAIf;IACZ,EAAM,EAAE,OAAO,CAAC;IAChB,cAAkB,EAAE,OAAO,eAAe,EAAE,cAAc,CAAC;IAC3D,QAAY,EAAE,QAAQ,CAAC;IACvB,SAAa,CAAC,EAAE,OAAO,CAAA;CACpB;0BAOS,OAAO,aAAa,EAAE,SAAS,GAAG;IAC9C,KAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAmB,CAAC,EAAE,MAAM,CAA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HED_RESULT = 'UNPUBLISHED';
36
36
  * @param {object} opts.powers
37
37
  * @param {Pick<Console, 'info'| 'error'>} opts.powers.logger
38
38
  * @param {(spec: import('./invitations').InvitationSpec) => ERef<Invitation>} opts.powers.invitationFromSpec
39
- * @param {(brand: Brand) => Promise<Purse>} opts.powers.purseForBrand
39
+ * @param {(brand: Brand) => Promise<import('./types').RemotePurse>} opts.powers.purseForBrand
40
40
  * @param {(status: OfferStatus) => void} opts.onStatusChange
41
- * @param {(offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').InvitationMakers, publicSubscribers: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord ) => Promise<void>} opts.onNewContinuingOffer
41
+ * @param {(offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').RemoteInvitationMakers, publicSubscribers: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord ) => Promise<void>} opts.onNewContinuingOffer
42
42
  */
43
43
  export const makeOfferExecutor = ({
44
44
  zoe,
@@ -86,13 +86,15 @@ export const makeOfferExecutor = ({
86
86
  deeplyFulfilledObject(paymentsManager.withdrawGive(proposal.give)));
87
87
 
88
88
  const invitation = invitationFromSpec(invitationSpec);
89
- const invitationAmount =
90
- await E(invitationIssuer).getAmountOf(invitation);
89
+ const invitationAmount = await E(invitationIssuer).getAmountOf(
90
+ invitation,
91
+ );
91
92
 
92
93
  // 2. Begin executing offer
93
94
  // No explicit signal to user that we reached here but if anything above
94
95
  // failed they'd get an 'error' status update.
95
96
 
97
+ // eslint-disable-next-line @jessie.js/no-nested-await -- unconditional
96
98
  seatRef = await E(zoe).offer(
97
99
  invitation,
98
100
  proposal,
package/src/payments.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export function makePaymentsHelper(purseForBrand: (brand: Brand) => Promise<Purse>, depositFacet: {
1
+ export function makePaymentsHelper(purseForBrand: (brand: Brand) => Promise<import('./types').RemotePurse>, depositFacet: {
2
2
  receive: (payment: any) => Promise<Amount>;
3
3
  }): {
4
4
  /**
@@ -10,7 +10,7 @@ export function makePaymentsHelper(purseForBrand: (brand: Brand) => Promise<Purs
10
10
  * Try reclaiming any of our payments that we successfully withdrew, but
11
11
  * were left unclaimed.
12
12
  */
13
- tryReclaimingWithdrawnPayments(): Promise<undefined> | Promise<PromiseSettledResult<Amount<AssetKind> | undefined>[]>;
13
+ tryReclaimingWithdrawnPayments(): Promise<undefined> | Promise<PromiseSettledResult<Amount<unknown> | undefined>[]>;
14
14
  /**
15
15
  * @param {PaymentPKeywordRecord} payouts
16
16
  * @returns {Promise<AmountKeywordRecord>} amounts for deferred deposits will be empty
@@ -1 +1 @@
1
- {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["payments.js"],"names":[],"mappings":"AAUO,0DAHY,KAAK,KAAK,QAAQ,KAAK,CAAC;+BACL,QAAQ,MAAM,CAAC;;IAcjD;;;OAGG;uBAFQ,mBAAmB,GACjB,qBAAqB;IAkBlC;;;OAGG;;IA8BH;;;OAGG;4BAFQ,qBAAqB,GACnB,QAAQ,mBAAmB,CAAC;EAU5C"}
1
+ {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["payments.js"],"names":[],"mappings":"AAUO,0DAHY,KAAK,KAAK,QAAQ,OAAO,SAAS,EAAE,WAAW,CAAC;+BAC7B,QAAQ,MAAM,CAAC;;IAcjD;;;OAGG;uBAFQ,mBAAmB,GACjB,qBAAqB;IAkBlC;;;OAGG;;IA8BH;;;OAGG;4BAFQ,qBAAqB,GACnB,QAAQ,mBAAmB,CAAC;EAU5C"}
package/src/payments.js CHANGED
@@ -5,7 +5,7 @@ import { E } from '@endo/far';
5
5
  /**
6
6
  * Used in an offer execution to manage payments state safely.
7
7
  *
8
- * @param {(brand: Brand) => Promise<Purse>} purseForBrand
8
+ * @param {(brand: Brand) => Promise<import('./types').RemotePurse>} purseForBrand
9
9
  * @param {{ receive: (payment: *) => Promise<Amount> }} depositFacet
10
10
  */
11
11
  export const makePaymentsHelper = (purseForBrand, depositFacet) => {
@@ -15,7 +15,7 @@ export const makePaymentsHelper = (purseForBrand, depositFacet) => {
15
15
  /**
16
16
  * Tracks from whence our payment came.
17
17
  *
18
- * @type {Map<Payment, Purse>}
18
+ * @type {Map<Payment, import('./types').RemotePurse>}
19
19
  */
20
20
  const paymentToPurse = new Map();
21
21
 
@@ -28,7 +28,7 @@ export const makePaymentsHelper = (purseForBrand, depositFacet) => {
28
28
  !keywordPaymentPromises ||
29
29
  Fail`withdrawPayments can be called once per helper`;
30
30
  keywordPaymentPromises = objectMap(give, amount => {
31
- /** @type {Promise<Purse>} */
31
+ /** @type {Promise<import('./types').RemotePurse<any>>} */
32
32
  const purseP = purseForBrand(amount.brand);
33
33
  return Promise.all([purseP, E(purseP).withdraw(amount)]).then(
34
34
  ([purse, payment]) => {
@@ -1,4 +1,4 @@
1
- export function upgradeWalletFactory({ consume: { contractKits, governedContractKits, chainStorage, walletBridgeManager: walletBridgeManagerP, }, instance: { consume: { walletFactory: wfInstanceP, provisionPool: ppInstanceP }, }, }: BootstrapPowers, config: {
1
+ export function upgradeWalletFactory({ consume: { contractKits: kitsP, instancePrivateArgs: argsP }, instance: { consume: { walletFactory: wfInstanceP }, }, }: BootstrapPowers, config: {
2
2
  options: {
3
3
  walletFactoryRef: VatSourceRef & {
4
4
  bundleID: string;
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-walletFactory-proposal.d.ts","sourceRoot":"","sources":["upgrade-walletFactory-proposal.js"],"names":[],"mappings":"AAqBO,yOALK,eAAe;;0BAGI,YAAY,GAAG;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE;;kBAkDjE;AAMM,mGAFK,eAAe,iBAwB1B;AAyBM;;;;;;;EAKN"}
1
+ {"version":3,"file":"upgrade-walletFactory-proposal.d.ts","sourceRoot":"","sources":["upgrade-walletFactory-proposal.js"],"names":[],"mappings":"AAoBO,gKALK,eAAe;;0BAGI,YAAY,GAAG;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE;;kBA6BjE;AAMM,mGAFK,eAAe,iBAwB1B;AAsBM;;;;;;;EAKN"}
@@ -8,7 +8,6 @@ console.warn('upgrade-walletFactory-proposal.js module evaluating');
8
8
  const { Fail } = assert;
9
9
 
10
10
  // vstorage paths under published.*
11
- const WALLET_STORAGE_PATH_SEGMENT = 'wallet';
12
11
  const BOARD_AUX = 'boardAux';
13
12
 
14
13
  const marshalData = makeMarshal(_val => Fail`data only`);
@@ -21,14 +20,9 @@ const marshalData = makeMarshal(_val => Fail`data only`);
21
20
  */
22
21
  export const upgradeWalletFactory = async (
23
22
  {
24
- consume: {
25
- contractKits,
26
- governedContractKits,
27
- chainStorage,
28
- walletBridgeManager: walletBridgeManagerP,
29
- },
23
+ consume: { contractKits: kitsP, instancePrivateArgs: argsP },
30
24
  instance: {
31
- consume: { walletFactory: wfInstanceP, provisionPool: ppInstanceP },
25
+ consume: { walletFactory: wfInstanceP },
32
26
  },
33
27
  },
34
28
  config,
@@ -36,36 +30,20 @@ export const upgradeWalletFactory = async (
36
30
  console.log('upgradeWalletFactory: config', config);
37
31
  const { walletFactoryRef } = config.options;
38
32
 
39
- // console.log('upgradeWalletFactory: awaiting instances etc.');
40
- const { wfInstance, ppInstance, walletBridgeManager, storageNode } =
41
- await allValues({
42
- wfInstance: wfInstanceP,
43
- ppInstance: ppInstanceP,
44
- walletBridgeManager: walletBridgeManagerP,
45
- // @ts-expect-error chainStorage is only falsy in testing
46
- storageNode: E(chainStorage).makeChildNode(WALLET_STORAGE_PATH_SEGMENT),
47
- });
48
- // console.log('upgradeWalletFactory: awaiting contract kits');
49
- const { wfKit, ppKit } = await allValues({
50
- wfKit: E(contractKits).get(wfInstance),
51
- ppKit: E(governedContractKits).get(ppInstance),
33
+ console.log('upgradeWalletFactory: awaiting instance');
34
+ const wfInstance = await wfInstanceP;
35
+ console.log('upgradeWalletFactory: awaiting contract kits');
36
+ const { contractKits, instancePrivateArgs } = await allValues({
37
+ contractKits: kitsP,
38
+ instancePrivateArgs: argsP,
52
39
  });
53
- // console.log('upgradeWalletFactory: awaiting walletReviver');
54
- const walletReviver = await E(ppKit.creatorFacet).getWalletReviver();
55
- const newPrivateArgs = harden({
56
- storageNode,
57
- walletBridgeManager,
58
- walletReviver,
59
- });
60
-
61
- console.log(
62
- 'upgradeWalletFactory: upgrading with newPrivateArgs',
63
- newPrivateArgs,
64
- );
65
- await E(wfKit.adminFacet).upgradeContract(
66
- walletFactoryRef.bundleID,
67
- newPrivateArgs,
68
- );
40
+ const { adminFacet } = contractKits.get(wfInstance);
41
+ /** @type {Parameters<typeof import('../walletFactory').prepare>[1]} */
42
+ // @ts-expect-error cast
43
+ const unsettledArgs = instancePrivateArgs.get(wfInstance);
44
+ const privateArgs = await allValues(unsettledArgs);
45
+ console.log('upgradeWalletFactory: upgrading with privateArgs', privateArgs);
46
+ await E(adminFacet).upgradeContract(walletFactoryRef.bundleID, privateArgs);
69
47
  console.log('upgradeWalletFactory: done');
70
48
  };
71
49
  harden(upgradeWalletFactory);
@@ -90,7 +68,7 @@ export const publishAgoricBrandsDisplayInfo = async ({
90
68
  await E(node).setValue(JSON.stringify(aux));
91
69
  };
92
70
 
93
- /** @type {ERef<import('@agoric/vats').NameHub>} */
71
+ /** @type {ERef<NameHub>} */
94
72
  const brandHub = E(agoricNames).lookup('brand');
95
73
  const brands = await E(brandHub).values();
96
74
  // tolerate failure; in particular, for the timer brand
@@ -104,10 +82,7 @@ const manifest = {
104
82
  // include rationale for closely-held, high authority capabilities
105
83
  consume: {
106
84
  contractKits: `to upgrade walletFactory using its adminFacet`,
107
- governedContractKits:
108
- 'to get walletReviver from provisionPool.creatorFacet',
109
- chainStorage: 'to allow walletFactory to (continue) write to vstorage',
110
- walletBridgeManager: 'to handle bridged cosmos SpendAction messages',
85
+ instancePrivateArgs: `to get privateArgs for walletFactory`,
111
86
  },
112
87
  // widely-shared, low authority instance handles need no rationale
113
88
  instance: {
@@ -1,5 +1,5 @@
1
1
  export const BRAND_TO_PURSES_KEY: "brandToPurses";
2
- export function prepareSmartWallet(baggage: MapStore<string, any>, shared: SharedParams): (uniqueWithoutChildNodes: Omit<UniqueParams, "currentStorageNode" | "walletStorageNode"> & {
2
+ export function prepareSmartWallet(baggage: MapStore<string, unknown>, shared: SharedParams): (uniqueWithoutChildNodes: Omit<UniqueParams, "currentStorageNode" | "walletStorageNode"> & {
3
3
  walletStorageNode: ERef<StorageNode>;
4
4
  }) => Promise<{
5
5
  /**
@@ -126,6 +126,7 @@ export type BrandDescriptor = {
126
126
  issuer: Issuer;
127
127
  petname: import('./types').Petname;
128
128
  };
129
+ export type RemotePurse = import('./types').RemotePurse;
129
130
  export type UniqueParams = {
130
131
  address: string;
131
132
  bank: ERef<import('@agoric/vats/src/vat-bank').Bank>;
@@ -155,7 +156,7 @@ export type ImmutableState = Readonly<UniqueParams & {
155
156
  offerToInvitationMakers: MapStore<string, import('./types').InvitationMakers>;
156
157
  offerToPublicSubscriberPaths: MapStore<string, Record<string, string>>;
157
158
  offerToUsedInvitation: MapStore<string, Amount>;
158
- purseBalances: MapStore<Purse, Amount>;
159
+ purseBalances: MapStore<RemotePurse, Amount>;
159
160
  updateRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<UpdateRecord>;
160
161
  currentRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<CurrentWalletRecord>;
161
162
  liveOffers: MapStore<import('./offers.js').OfferId, import('./offers.js').OfferStatus>;
@@ -1 +1 @@
1
- {"version":3,"file":"smartWallet.d.ts","sourceRoot":"","sources":["smartWallet.js"],"names":[],"mappings":"AAgMA,kDAAmD;AAiB5C,2EAFI,YAAY;uBAmiB2E,KAAK,WAAW,CAAC;;IA9F3G;;;;;;OAMG;sCAHQ,OAAO,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,mCAErC,QAAQ,IAAI,CAAC;;QApK1B;;;;;;;;WAQG;yBAHQ,OAAO,GACL,QAAQ,MAAM,CAAC;;;QAiC5B;;;;;;WAMG;gCAHQ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,qBAAyB,EAAE,SAAS,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,aAAiB,EAAE,SAAS,WAAW,EAAE,MAAM,CAAC,CAAC;IACjD,iBAAqB,EAAE,OAAO,6CAA6C,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACvG,kBAAsB,EAAE,OAAO,6CAA6C,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAC/G,UAAc,EAAE,SAAS,OAAO,aAAa,EAAE,OAAO,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC,CAAC;IAC3F,cAAkB,EAAE,aAAa,OAAO,aAAa,EAAE,OAAO,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC;CAChF,CAAC;0BAEQ,eAAe,GAAG;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE;2BAClC,EACT;0BA+mBU,QAAQ,WAAW,WAAW,yBAAyB,CAAC,CAAC,CAAC"}
@@ -1,3 +1,5 @@
1
+ // backported types are out of sync
2
+ // @ts-nocheck
1
3
  import {
2
4
  AmountShape,
3
5
  BrandShape,
@@ -111,6 +113,9 @@ const trace = makeTracer('SmrtWlt');
111
113
  * For use by clients to describe brands to users. Includes `displayInfo` to save a remote call.
112
114
  */
113
115
 
116
+ // imports
117
+ /** @typedef {import('./types').RemotePurse} RemotePurse */
118
+
114
119
  /**
115
120
  * @typedef {{
116
121
  * address: string,
@@ -142,7 +147,7 @@ const trace = makeTracer('SmrtWlt');
142
147
  * offerToInvitationMakers: MapStore<string, import('./types').InvitationMakers>,
143
148
  * offerToPublicSubscriberPaths: MapStore<string, Record<string, string>>,
144
149
  * offerToUsedInvitation: MapStore<string, Amount>,
145
- * purseBalances: MapStore<Purse, Amount>,
150
+ * purseBalances: MapStore<RemotePurse, Amount>,
146
151
  * updateRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<UpdateRecord>,
147
152
  * currentRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<CurrentWalletRecord>,
148
153
  * liveOffers: MapStore<import('./offers.js').OfferId, import('./offers.js').OfferStatus>,
@@ -160,7 +165,7 @@ const trace = makeTracer('SmrtWlt');
160
165
  * TODO: consider moving to nameHub.js?
161
166
  *
162
167
  * @param {unknown} target - passable Key
163
- * @param {ERef<import('@agoric/vats').NameHub>} nameHub
168
+ * @param {ERef<NameHub>} nameHub
164
169
  */
165
170
  const namesOf = async (target, nameHub) => {
166
171
  const entries = await E(nameHub).entries();
@@ -371,7 +376,7 @@ export const prepareSmartWallet = (baggage, shared) => {
371
376
  !used || Fail`cannot re-use offer id ${id}`;
372
377
  },
373
378
  /**
374
- * @param {Purse} purse
379
+ * @param {RemotePurse} purse
375
380
  * @param {Amount<any>} balance
376
381
  */
377
382
  updateBalance(purse, balance) {
@@ -410,7 +415,7 @@ export const prepareSmartWallet = (baggage, shared) => {
410
415
  });
411
416
  },
412
417
 
413
- /** @type {(purse: ERef<Purse>) => Promise<void>} */
418
+ /** @type {(purse: ERef<RemotePurse>) => Promise<void>} */
414
419
  async watchPurse(purseRef) {
415
420
  const { address } = this.state;
416
421
 
@@ -447,7 +452,7 @@ export const prepareSmartWallet = (baggage, shared) => {
447
452
  * to facilitate a transition to decentralized introductions.
448
453
  *
449
454
  * @param {Brand} brand
450
- * @param {ERef<import('@agoric/vats').NameHub>} known - namehub with brand, issuer branches
455
+ * @param {ERef<NameHub>} known - namehub with brand, issuer branches
451
456
  * @returns {Promise<Purse | undefined>} undefined if brand is not known
452
457
  */
453
458
  async getPurseIfKnownBrand(brand, known) {
@@ -579,14 +584,15 @@ export const prepareSmartWallet = (baggage, shared) => {
579
584
  ),
580
585
  /**
581
586
  * @param {Brand} brand
582
- * @returns {Promise<Purse>}
587
+ * @returns {Promise<RemotePurse>}
583
588
  */
584
589
  purseForBrand: async brand => {
585
590
  const { helper } = facets;
586
591
  if (registry.has(brand)) {
587
- // @ts-expect-error virtual purse
592
+ // @ts-expect-error RemotePurse cast
588
593
  return E(bank).getPurse(brand);
589
594
  } else if (invitationBrand === brand) {
595
+ // @ts-expect-error RemotePurse cast
590
596
  return invitationPurse;
591
597
  }
592
598
 
@@ -621,7 +627,7 @@ export const prepareSmartWallet = (baggage, shared) => {
621
627
  }
622
628
  }
623
629
  },
624
- /** @type {(offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').InvitationMakers, publicSubscribers?: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord) => Promise<void>} */
630
+ /** @type {(offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').RemoteInvitationMakers, publicSubscribers?: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord) => Promise<void>} */
625
631
  onNewContinuingOffer: async (
626
632
  offerId,
627
633
  invitationAmount,
@@ -746,6 +752,7 @@ export const prepareSmartWallet = (baggage, shared) => {
746
752
  const { invitationPurse } = state;
747
753
  const { helper } = facets;
748
754
 
755
+ // @ts-expect-error RemotePurse cast
749
756
  void helper.watchPurse(invitationPurse);
750
757
  },
751
758
  },
@@ -1,4 +1,4 @@
1
1
  export namespace shape {
2
- let WalletBridgeMsg: import("@endo/patterns").Matcher;
2
+ const WalletBridgeMsg: import("@endo/patterns").Matcher;
3
3
  }
4
4
  //# sourceMappingURL=typeGuards.d.ts.map
package/src/types.d.ts CHANGED
@@ -5,11 +5,9 @@
5
5
  * Downside is it can't reference any ambient types, which most of agoric-sdk type are presently.
6
6
  */
7
7
 
8
- import type { ERef } from '@endo/far';
8
+ import { ERef, FarRef } from '@endo/far';
9
9
  import type { CapData } from '@endo/marshal';
10
10
  import type { MsgWalletSpendAction } from '@agoric/cosmic-proto/swingset/msgs';
11
- import type { AgoricNamesRemotes } from '@agoric/vats/tools/board-utils.js';
12
- import type { OfferSpec } from './offers.js';
13
11
 
14
12
  declare const CapDataShape: unique symbol;
15
13
 
@@ -21,9 +19,10 @@ declare const CapDataShape: unique symbol;
21
19
  */
22
20
  export type Petname = string | string[];
23
21
 
24
- export type InvitationMakers = Record<
25
- string,
26
- (...args: any[]) => Promise<Invitation>
22
+ export type RemotePurse<T = unknown> = FarRef<Purse<T>>;
23
+
24
+ export type RemoteInvitationMakers = FarRef<
25
+ Record<string, (...args: any[]) => Promise<Invitation>>
27
26
  >;
28
27
 
29
28
  export type PublicSubscribers = Record<string, ERef<StoredFacet>>;
@@ -75,11 +74,3 @@ export type WalletSpendActionMsg = {
75
74
  * the sending of the message (as is the case for WALLET_SPEND_ACTION).
76
75
  */
77
76
  export type WalletBridgeMsg = WalletActionMsg | WalletSpendActionMsg;
78
-
79
- /**
80
- * Used for clientSupport helpers
81
- */
82
- export type OfferMaker = (
83
- agoricNames: AgoricNamesRemotes,
84
- ...rest: any[]
85
- ) => OfferSpec;
@@ -1,7 +1,7 @@
1
1
  export namespace customTermsShape {
2
- let agoricNames: any;
3
- let board: any;
4
- let assetPublisher: any;
2
+ const agoricNames: any;
3
+ const board: any;
4
+ const assetPublisher: any;
5
5
  }
6
6
  export const privateArgsShape: import("@endo/patterns").Matcher;
7
7
  export function publishDepositFacet(address: string, wallet: import('./smartWallet.js').SmartWallet, namesByAddressAdmin: ERef<import('@agoric/vats').NameAdmin>): Promise<unknown>;
@@ -26,7 +26,7 @@ export function prepare(zcf: ZCF<SmartWalletContractTerms>, privateArgs: {
26
26
  storageNode: ERef<StorageNode>;
27
27
  walletBridgeManager?: ERef<import("@agoric/vats").ScopedBridgeManager> | undefined;
28
28
  walletReviver?: ERef<WalletReviver> | undefined;
29
- }, baggage: MapStore<string, any>): Promise<{
29
+ }, baggage: MapStore<string, unknown>): Promise<{
30
30
  creatorFacet: {
31
31
  /**
32
32
  * @param {string} address
@@ -1 +1 @@
1
- {"version":3,"file":"walletFactory.d.ts","sourceRoot":"","sources":["walletFactory.js"],"names":[],"mappings":";;;;;AAwBA,gEAKE;AAUK,6CAJI,MAAM,UACN,OAAO,kBAAkB,EAAE,WAAW,uBACtC,KAAK,OAAO,cAAc,EAAE,SAAS,CAAC,oBAehD;AAWM,kDAFI,cAAc;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B;iBAAf,KAAK;eApCP,KAAK;qBACC,WAAW;gBAChB,MAAM;iBACL,OAAO,SAAS,EAAE,OAAO;;;eAH3B,KAAK;qBACC,WAAW;gBAChB,MAAM;iBACL,OAAO,SAAS,EAAE,OAAO;;EAsCxC;AAmCM,6BARI,IAAI,wBAAwB,CAAC;iBAEtB,KAAK,WAAW,CAAC;;;;;QAgH7B;;;;;;;WAOG;oCANQ,MAAM,QACN,KAAK,OAAO,2BAA2B,EAAE,IAAI,CAAC,uBAC9C,KAAK,OAAO,eAAe,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;QAHlD;;;;;;;WAOG;oCANQ,MAAM,QACN,KAAK,OAAO,2BAA2B,EAAE,IAAI,CAAC,uBAC9C,KAAK,OAAO,eAAe,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;GAqDvD;uCAlMY;IACZ,WAAe,EAAE,KAAK,OAAO,CAAC,CAAC;IAC/B,KAAS,EAAE,KAAK,OAAO,cAAc,EAAE,KAAK,CAAC,CAAC;IAC9C,cAAkB,EAAE,cAAc,CAAC;CAChC;sBAES,OAAO,cAAc,EAAE,OAAO;6BAE9B;IACZ,oBAAwB,EAAE,MAAM,KAChC,kBAAwB,OAAO,2BAA2B,EAAE,eAAe,CAAC,CAAC,CAAA;CAC1E;uBAES,OAAO;;4BAES,MAAM,KAAK,QAAQ,OAAO,eAAe,EAAE,WAAW,CAAC;yBAC1D,MAAM,KAAK,QAAQ;;oBAuL/B,cAAc"}
@@ -142,7 +142,6 @@ export const makeAssetRegistry = assetPublisher => {
142
142
  * @param {import('@agoric/vat-data').Baggage} baggage
143
143
  */
144
144
  export const prepare = async (zcf, privateArgs, baggage) => {
145
- const upgrading = baggage.has('walletsByAddress');
146
145
  const { agoricNames, board, assetPublisher } = zcf.getTerms();
147
146
 
148
147
  const zoe = zcf.getZoeService();
@@ -293,6 +292,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
293
292
  if (walletBridgeManager) {
294
293
  // NB: may not be in service when creatorFacet is used, or ever
295
294
  // It can't be awaited because that fails vat restart
295
+ const upgrading = baggage.has('walletsByAddress');
296
296
  if (upgrading) {
297
297
  void E(walletBridgeManager).setHandler(handleWalletAction);
298
298
  } else {