@agoric/smart-wallet 0.5.4-mainnet1B-dev-b0c1f78.0 → 0.5.4-orchestration-dev-096c4e8.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 DELETED
@@ -1,208 +0,0 @@
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-u13.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.4-u12.0...@agoric/smart-wallet@0.5.4-u13.0) (2023-12-07)
7
-
8
- **Note:** Version bump only for package @agoric/smart-wallet
9
-
10
-
11
-
12
-
13
-
14
- ### [0.5.4-u12.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.4-u11wf.0...@agoric/smart-wallet@0.5.4-u12.0) (2023-11-10)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * **walletFactory:** move upgrading check before baggage is populated ([#8322](https://github.com/Agoric/agoric/issues/8322)) ([330b7a2](https://github.com/Agoric/agoric/commit/330b7a26da9a8eefb95e3e0fd082714fdfad7873))
20
-
21
-
22
-
23
- ### [0.5.4-u11wf.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.4-u11.0...@agoric/smart-wallet@0.5.4-u11wf.0) (2023-09-23)
24
-
25
-
26
- ### Features
27
-
28
- * **smart-wallet:** trading in non-vbank asset ([dc99ca0](https://github.com/Agoric/agoric/commit/dc99ca0b58af3a66778071993f0d73d099605069))
29
- * **smart-wallet:** upgrade walletFactory for non-vbank assets ([073b450](https://github.com/Agoric/agoric/commit/073b450b0790d1837d59e80c0109f0923b5f0cd2))
30
- * **smart-wallet:** withdraw payments before getting invitation ([82ed64e](https://github.com/Agoric/agoric/commit/82ed64ec20ce7884d6cdf6caac63fab85d02af40)), closes [#7098](https://github.com/Agoric/agoric/issues/7098)
31
-
32
-
33
-
34
- ### [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)
35
-
36
- **Note:** Version bump only for package @agoric/smart-wallet
37
-
38
-
39
-
40
-
41
-
42
- ### [0.5.3](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.2...@agoric/smart-wallet@0.5.3) (2023-06-09)
43
-
44
- **Note:** Version bump only for package @agoric/smart-wallet
45
-
46
-
47
-
48
-
49
-
50
- ### [0.5.2](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.1...@agoric/smart-wallet@0.5.2) (2023-06-02)
51
-
52
- **Note:** Version bump only for package @agoric/smart-wallet
53
-
54
-
55
-
56
-
57
-
58
- ### [0.5.1](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.0...@agoric/smart-wallet@0.5.1) (2023-05-24)
59
-
60
- **Note:** Version bump only for package @agoric/smart-wallet
61
-
62
-
63
-
64
-
65
-
66
- ## [0.5.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.2...@agoric/smart-wallet@0.5.0) (2023-05-19)
67
-
68
-
69
- ### ⚠ BREAKING CHANGES
70
-
71
- * emit smallcaps-format data in all marshallers
72
- * move PublicTopic to Zoe contractSupport
73
- * **wallet:** reject executeOffer on failure
74
- * storage paths by getPublicTopics
75
- * rename 'fit' to 'mustMatch'
76
-
77
- ### Features
78
-
79
- * emit smallcaps-format data in all marshallers ([1753df8](https://github.com/Agoric/agoric/commit/1753df83465785b5ee71b250770c9b012d750ffc)), closes [#6822](https://github.com/Agoric/agoric/issues/6822)
80
- * **board-utils:** BoardRemote like Remotables ([3aa44de](https://github.com/Agoric/agoric/commit/3aa44debbdc955892611ba870478fb088395cf10))
81
- * **smartWallet:** fail early on offerId re-use ([08307e0](https://github.com/Agoric/agoric/commit/08307e01a6c9a3d53144df55f52e03f8f9df2a78))
82
- * 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)
83
- * **contractSupport:** provideAll takes thunks ([f35034b](https://github.com/Agoric/agoric/commit/f35034b13b99dbfb8d472816644e09f9b4f2be3a))
84
- * **contractSupport:** providePublicTopic ([5bdb71e](https://github.com/Agoric/agoric/commit/5bdb71e1af9ecde163322612de3e648fd75d7a47))
85
- * **smart-wallet:** exit offer ([7323023](https://github.com/Agoric/agoric/commit/7323023308aa40c145e60093b7fc52580534cd2d))
86
- * **smart-wallet:** preserve existing `myAddressNameAdmin` ([8f283af](https://github.com/Agoric/agoric/commit/8f283aff0fc7b6146e9b6393c158cd9ca15f31f9))
87
- * **smart-wallet:** publish pending offers before completion ([c913b36](https://github.com/Agoric/agoric/commit/c913b36950be1d2ae1b16d16bfcfc8df32305e0c))
88
- * **smart-wallet:** publish possibly exitable offers ([de0170a](https://github.com/Agoric/agoric/commit/de0170add5bd4c82cbef23431bffaa95f7007880))
89
- * **topics:** makePublicTopic ([c8b464c](https://github.com/Agoric/agoric/commit/c8b464c26c53535097e4df573e126c81e00e5aa6))
90
- * **vats:** Scoped bridge managers ([11f6429](https://github.com/Agoric/agoric/commit/11f64298d8529cca249d2933894236dc534dfe3e))
91
- * **wallet:** executeOffer throw errors ([224dbca](https://github.com/Agoric/agoric/commit/224dbca918343608d53f691a448171c8a48d283e))
92
- * **wallet:** record bridge errors to vstorage ([f8581e9](https://github.com/Agoric/agoric/commit/f8581e95311f7cb4105f6d81f0ac7b6a9121b68f))
93
- * **wallet:** reject executeOffer on failure ([308caab](https://github.com/Agoric/agoric/commit/308caab24c1680c2c7910eff8128f9089dedf26d))
94
- * **walletFactory:** more durability ([7e6c98d](https://github.com/Agoric/agoric/commit/7e6c98d4a448eb94de98c865bc8280534bd5069f))
95
- * **walletFactory:** upgradable ([ca30e05](https://github.com/Agoric/agoric/commit/ca30e05988fae00f437b5708dbabe061742797f1))
96
- * agoricContract invitation getter ([ca6166f](https://github.com/Agoric/agoric/commit/ca6166f94a934811f698631f9ce1dd2a32ad422c))
97
- * allow string for offer id, leave uniqueness to client ([7856e56](https://github.com/Agoric/agoric/commit/7856e5635ba04671da17334080dad061a8f9fc15))
98
- * boot-oracles ([ce8f8de](https://github.com/Agoric/agoric/commit/ce8f8de65ad4c14b4e8d699cd721683cfa1cc495))
99
- * durable smart wallet ([6977f73](https://github.com/Agoric/agoric/commit/6977f73f820a9345ef49f4f18095a5c88af06729))
100
- * fixed heap for getPublicTopics ([1886c3a](https://github.com/Agoric/agoric/commit/1886c3af2319b9540faa318cf6179d4d01eec084))
101
- * storage paths by getPublicTopics ([40a8624](https://github.com/Agoric/agoric/commit/40a8624240f241a686c28bd7d7c7ef1ef780f984))
102
- * support TopicsRecord ([8618461](https://github.com/Agoric/agoric/commit/8618461781fe11f28e6b891a4d31ebfd9dda5e0d))
103
- * track publicSubscribers ([30cae51](https://github.com/Agoric/agoric/commit/30cae513a624a74f2df05b668f4eaa02d6d13656))
104
- * vaults list command ([894c92f](https://github.com/Agoric/agoric/commit/894c92f9ee6331aba43aaeebd6c007dd03d53996))
105
-
106
-
107
- ### Bug Fixes
108
-
109
- * handle {} wallet update records ([c7dbccb](https://github.com/Agoric/agoric/commit/c7dbccbad2d2007af398c31c94f68793fe4e8504))
110
- * **cli:** dont blow up from old wallet updates ([ac5a28e](https://github.com/Agoric/agoric/commit/ac5a28e9e47916b0d3ba7978d90067a757470be3))
111
- * **walletFactory:** handle restartContract ([f8b7200](https://github.com/Agoric/agoric/commit/f8b720014c2987301a67d073348b80fc1d30d756))
112
- * Improve the smart wallet revival handshake ([69ec2e7](https://github.com/Agoric/agoric/commit/69ec2e76f06cf87454d087adfa2ef6c2adcea8a0))
113
- * **vats:** Extract revivable wallet addresses from the correct chain storage path ([2454d3f](https://github.com/Agoric/agoric/commit/2454d3f48eefb2bdea5a0d03a250d8a5a74b0ba3))
114
- * add missing facet interface ([d16bc2e](https://github.com/Agoric/agoric/commit/d16bc2e121810c8c432519028e4382146b066956))
115
- * 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)
116
- * number/string inconsistency with offer lookup ([59abbdb](https://github.com/Agoric/agoric/commit/59abbdb0a6498333ec48e971347076f7739c9b84))
117
- * Preserve smart wallets through bulldozer upgrade ([160bf6c](https://github.com/Agoric/agoric/commit/160bf6cad0bbdfe6a245f6b7a8e260d244c44f21)), closes [#7537](https://github.com/Agoric/agoric/issues/7537)
118
- * use `subscribeEach` to get reconnect benefits ([fb24132](https://github.com/Agoric/agoric/commit/fb24132f9b4e117e56bae2803994e57c188344f3))
119
- * **wallet:** pipeTopicToStorage with Recorder kit ([31b79b7](https://github.com/Agoric/agoric/commit/31b79b71eda59b62d3bacd7ca648b53b9385afc0))
120
- * **wallet:** recording handleBridgeAction errors ([8e64158](https://github.com/Agoric/agoric/commit/8e6415872dafc1cd5def9c038d673842464b316b))
121
- * multiple deposits of unknown brand ([6ef6062](https://github.com/Agoric/agoric/commit/6ef6062a4b69b0d44b18dc576021bbbaf372b3b2))
122
- * purse making (use vbank) ([9175882](https://github.com/Agoric/agoric/commit/91758824848ea24f5cd4cae5eaadf88169b80e39))
123
- * race in watchPurse to update balance ([51869c1](https://github.com/Agoric/agoric/commit/51869c1ffce90350cbaed84b5f92fa05c3473f3e))
124
- * rename from FarClass to ExoClass, etc ([#6323](https://github.com/Agoric/agoric/issues/6323)) ([da96c7c](https://github.com/Agoric/agoric/commit/da96c7c3c902a5e266baeedf23df02481f2e9c9d))
125
- * **smart-wallet:** create purses for new assets lazily ([e241ba0](https://github.com/Agoric/agoric/commit/e241ba03a7d9f441436b3d987f9327060d7dd8ce))
126
-
127
-
128
- ### Miscellaneous Chores
129
-
130
- * rename 'fit' to 'mustMatch' ([9fa3232](https://github.com/Agoric/agoric/commit/9fa32324f84bfb85de9e99e0c9ad277b8017b50e)), closes [#6844](https://github.com/Agoric/agoric/issues/6844)
131
-
132
-
133
- ### Code Refactoring
134
-
135
- * move PublicTopic to Zoe contractSupport ([c51ea3d](https://github.com/Agoric/agoric/commit/c51ea3de22f50e05fcc1aaabd2108e785d51eb2e))
136
-
137
-
138
-
139
- ### [0.4.4](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.3...@agoric/smart-wallet@0.4.4) (2023-02-17)
140
-
141
- **Note:** Version bump only for package @agoric/smart-wallet
142
-
143
-
144
-
145
-
146
-
147
- ### [0.4.3](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.2...@agoric/smart-wallet@0.4.3) (2022-12-14)
148
-
149
- **Note:** Version bump only for package @agoric/smart-wallet
150
-
151
-
152
-
153
-
154
-
155
- ### [0.4.2](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.1...@agoric/smart-wallet@0.4.2) (2022-10-18)
156
-
157
- **Note:** Version bump only for package @agoric/smart-wallet
158
-
159
-
160
-
161
-
162
-
163
- ### [0.4.1](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.4.0...@agoric/smart-wallet@0.4.1) (2022-10-08)
164
-
165
- **Note:** Version bump only for package @agoric/smart-wallet
166
-
167
-
168
-
169
-
170
-
171
- ## [0.4.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.3.0...@agoric/smart-wallet@0.4.0) (2022-10-05)
172
-
173
-
174
- ### Features
175
-
176
- * **cli:** use new wallet.current node ([71effe7](https://github.com/Agoric/agoric/commit/71effe758c28181b8709ae4ccf025fcec7bb8a38))
177
- * track consumed invitation amounts ([e9e3c35](https://github.com/Agoric/agoric/commit/e9e3c35cebdc85e80fb2eaa117ff0be00d26c9bb))
178
- * **cli:** show status of invitations ([8506e6d](https://github.com/Agoric/agoric/commit/8506e6d87ef331e781c9d2e2251fdcf48e784e04))
179
-
180
-
181
- ### Bug Fixes
182
-
183
- * **vats:** handle duplicate provision requests ([#6307](https://github.com/Agoric/agoric/issues/6307)) ([05d405d](https://github.com/Agoric/agoric/commit/05d405d5409e1f80612bb002234f5a9c3910a7df))
184
- * **wallet-ui:** detect unprovisioned wallet ([1747d57](https://github.com/Agoric/agoric/commit/1747d5781f4ee594eca1ded76af4944c405e7000))
185
-
186
-
187
-
188
- ## 0.3.0 (2022-09-20)
189
-
190
-
191
- ### Features
192
-
193
- * **wallet:** more diagnostics for invitation match ([98630ee](https://github.com/Agoric/agoric/commit/98630ee96a202cf3907e37b5d4d549bb37b1263d))
194
- * **wallet-ui:** start displaying balances ([0f36da9](https://github.com/Agoric/agoric/commit/0f36da99daef86f24670d606ae5fd1adb32b419b))
195
- * 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))
196
- * **smart-wallet:** include lastOfferId in error ([932cb7d](https://github.com/Agoric/agoric/commit/932cb7d90b8e281f0922d0b38287230aabd6f535))
197
- * **smartWallet:** defer deposits until purse available ([#6172](https://github.com/Agoric/agoric/issues/6172)) ([1a1cc41](https://github.com/Agoric/agoric/commit/1a1cc41d421760563892212e1ca3df237a7a6661))
198
- * **smartWallet:** virtual objects ([659ad58](https://github.com/Agoric/agoric/commit/659ad58349f972881a540d78ec5d856872dacc7d))
199
- * distribute PSM Charter Invitatitons ([#6166](https://github.com/Agoric/agoric/issues/6166)) ([50cd3e2](https://github.com/Agoric/agoric/commit/50cd3e240fb33079948fa03b32bda86276879b4a))
200
- * new Smart Wallet ([708972f](https://github.com/Agoric/agoric/commit/708972f1f531c9ea5e346f833c6d253efe80f837))
201
-
202
-
203
- ### Bug Fixes
204
-
205
- * **smart-wallet:** invitation brand is remote ([6613136](https://github.com/Agoric/agoric/commit/66131366f563ebfefbeabeecffda43211a093d1e))
206
- * **smart-wallet:** not yet durable-able ([db66c2c](https://github.com/Agoric/agoric/commit/db66c2c13de92f2a0783bcaf174223691ab0a339))
207
- * Fix test failures in packages other than "vats" ([364815b](https://github.com/Agoric/agoric/commit/364815b88429e3443734681b5b0771b7d824ebe8))
208
- * 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/src/payments.d.ts DELETED
@@ -1,20 +0,0 @@
1
- export function makePaymentsHelper(purseForBrand: (brand: Brand) => Promise<import('./types').RemotePurse>, depositFacet: {
2
- receive: (payment: any) => Promise<Amount>;
3
- }): {
4
- /**
5
- * @param {AmountKeywordRecord} give
6
- * @returns {PaymentPKeywordRecord}
7
- */
8
- withdrawGive(give: AmountKeywordRecord): PaymentPKeywordRecord;
9
- /**
10
- * Try reclaiming any of our payments that we successfully withdrew, but
11
- * were left unclaimed.
12
- */
13
- tryReclaimingWithdrawnPayments(): Promise<undefined> | Promise<PromiseSettledResult<Amount<unknown> | undefined>[]>;
14
- /**
15
- * @param {PaymentPKeywordRecord} payouts
16
- * @returns {Promise<AmountKeywordRecord>} amounts for deferred deposits will be empty
17
- */
18
- depositPayouts(payouts: PaymentPKeywordRecord): Promise<AmountKeywordRecord>;
19
- };
20
- //# sourceMappingURL=payments.d.ts.map
@@ -1 +0,0 @@
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 DELETED
@@ -1,89 +0,0 @@
1
- import { Fail } from '@agoric/assert';
2
- import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
3
- import { E } from '@endo/far';
4
-
5
- /**
6
- * Used in an offer execution to manage payments state safely.
7
- *
8
- * @param {(brand: Brand) => Promise<import('./types').RemotePurse>} purseForBrand
9
- * @param {{ receive: (payment: *) => Promise<Amount> }} depositFacet
10
- */
11
- export const makePaymentsHelper = (purseForBrand, depositFacet) => {
12
- /** @type {PaymentPKeywordRecord | null} */
13
- let keywordPaymentPromises = null;
14
-
15
- /**
16
- * Tracks from whence our payment came.
17
- *
18
- * @type {Map<Payment, import('./types').RemotePurse>}
19
- */
20
- const paymentToPurse = new Map();
21
-
22
- return {
23
- /**
24
- * @param {AmountKeywordRecord} give
25
- * @returns {PaymentPKeywordRecord}
26
- */
27
- withdrawGive(give) {
28
- !keywordPaymentPromises ||
29
- Fail`withdrawPayments can be called once per helper`;
30
- keywordPaymentPromises = objectMap(give, amount => {
31
- /** @type {Promise<import('./types').RemotePurse<any>>} */
32
- const purseP = purseForBrand(amount.brand);
33
- return Promise.all([purseP, E(purseP).withdraw(amount)]).then(
34
- ([purse, payment]) => {
35
- paymentToPurse.set(payment, purse);
36
- return payment;
37
- },
38
- );
39
- });
40
- return keywordPaymentPromises;
41
- },
42
-
43
- /**
44
- * Try reclaiming any of our payments that we successfully withdrew, but
45
- * were left unclaimed.
46
- */
47
- tryReclaimingWithdrawnPayments() {
48
- if (!keywordPaymentPromises) return Promise.resolve(undefined);
49
- const paymentPromises = Object.values(keywordPaymentPromises);
50
- // Use allSettled to ensure we attempt all the deposits, regardless of
51
- // individual rejections.
52
- return Promise.allSettled(
53
- paymentPromises.map(async paymentP => {
54
- // Wait for the withdrawal to complete. This protects against a race
55
- // when updating paymentToPurse.
56
- const payment = await paymentP;
57
-
58
- // Find out where it came from.
59
- const purse = paymentToPurse.get(payment);
60
- if (purse === undefined) {
61
- // We already tried to reclaim this payment, so stop here.
62
- return undefined;
63
- }
64
-
65
- // Now send it back to the purse.
66
- try {
67
- return E(purse).deposit(payment);
68
- } finally {
69
- // Once we've called addPayment, mark this one as done.
70
- paymentToPurse.delete(payment);
71
- }
72
- }),
73
- );
74
- },
75
-
76
- /**
77
- * @param {PaymentPKeywordRecord} payouts
78
- * @returns {Promise<AmountKeywordRecord>} amounts for deferred deposits will be empty
79
- */
80
- async depositPayouts(payouts) {
81
- /** Record<string, Promise<Amount>> */
82
- const amountPKeywordRecord = objectMap(payouts, paymentRef =>
83
- E.when(paymentRef, payment => depositFacet.receive(payment)),
84
- );
85
- return deeplyFulfilledObject(amountPKeywordRecord);
86
- },
87
- };
88
- };
89
- harden(makePaymentsHelper);