@agoric/smart-wallet 0.5.3 → 0.5.4-calypso-dev-84eb287.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/src/offers.d.ts CHANGED
@@ -3,46 +3,22 @@
3
3
  */
4
4
  /**
5
5
  * @typedef {{
6
- * id: OfferId,
7
- * invitationSpec: import('./invitations').InvitationSpec,
8
- * proposal: Proposal,
9
- * offerArgs?: unknown
6
+ * id: OfferId;
7
+ * invitationSpec: import('./invitations.js').InvitationSpec;
8
+ * proposal: Proposal;
9
+ * offerArgs?: any;
10
10
  * }} OfferSpec
11
11
  */
12
12
  /** Value for "result" field when the result can't be published */
13
13
  export const UNPUBLISHED_RESULT: "UNPUBLISHED";
14
- export function makeOfferExecutor({ zoe, depositFacet, invitationIssuer, powers, onStatusChange, onNewContinuingOffer, }: {
15
- zoe: ERef<ZoeService>;
16
- depositFacet: {
17
- receive: (payment: any) => Promise<Amount>;
18
- };
19
- invitationIssuer: ERef<Issuer<'set'>>;
20
- powers: {
21
- logger: Pick<Console, 'info' | 'error'>;
22
- invitationFromSpec: (spec: import('./invitations').InvitationSpec) => ERef<Invitation>;
23
- purseForBrand: (brand: Brand) => Promise<import('./types').RemotePurse>;
24
- };
25
- onStatusChange: (status: OfferStatus) => 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
- }): {
28
- /**
29
- * Take an offer description provided in capData, augment it with payments and call zoe.offer()
30
- *
31
- * @param {OfferSpec} offerSpec
32
- * @param {(seatRef: UserSeat) => void} onSeatCreated
33
- * @returns {Promise<void>} when the offer has been sent to Zoe; payouts go into this wallet's purses
34
- * @throws if any parts of the offer are determined to be invalid before calling Zoe's `offer()`
35
- */
36
- executeOffer(offerSpec: OfferSpec, onSeatCreated: (seatRef: UserSeat) => void): Promise<void>;
37
- };
38
14
  export type OfferId = number | string;
39
15
  export type OfferSpec = {
40
16
  id: OfferId;
41
- invitationSpec: import('./invitations').InvitationSpec;
17
+ invitationSpec: import("./invitations.js").InvitationSpec;
42
18
  proposal: Proposal;
43
- offerArgs?: unknown;
19
+ offerArgs?: any;
44
20
  };
45
- export type OfferStatus = import('./offers.js').OfferSpec & {
21
+ export type OfferStatus = OfferSpec & {
46
22
  error?: string;
47
23
  numWantsSatisfied?: number;
48
24
  result?: unknown | typeof UNPUBLISHED_RESULT;
@@ -1 +1 @@
1
- {"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["offers.js"],"names":[],"mappings":"AAGA;;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,OAAO,SAAS,EAAE,WAAW,CAAC;;6BAC/C,WAAW,KAAK,IAAI;oCACnB,MAAM,oBAAoB,OAAO,KAAK,CAAC,oBAAoB,OAAO,SAAS,EAAE,sBAAsB,qBAAqB,OAAO,SAAS,EAAE,iBAAiB,GAAG,OAAO,iCAAiC,EAAE,YAAY,KAAM,QAAQ,IAAI,CAAC;;IAaxP;;;;;;;OAOG;4BAJQ,SAAS,2BACC,QAAQ,KAAK,IAAI,GACzB,QAAQ,IAAI,CAAC;EA0I7B;sBA/LY,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,CAAA;IAC5B,MAAQ,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAC;IAC/C,OAAS,CAAC,EAAE,mBAAmB,CAAC;CAC7B"}
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,GAAG,CAAC;CACjB;0BAOS,SAAS,GAAG;IACxB,KAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAU,CAAC,EAAE,OAAO,GAAG,OAAO,kBAAkB,CAAC;IACjD,OAAW,CAAC,EAAE,mBAAmB,CAAC;CAC/B"}
package/src/offers.js CHANGED
@@ -1,16 +1,13 @@
1
- import { E, passStyleOf } from '@endo/far';
2
- import { makePaymentsHelper } from './payments.js';
3
-
4
1
  /**
5
2
  * @typedef {number | string} OfferId
6
3
  */
7
4
 
8
5
  /**
9
6
  * @typedef {{
10
- * id: OfferId,
11
- * invitationSpec: import('./invitations').InvitationSpec,
12
- * proposal: Proposal,
13
- * offerArgs?: unknown
7
+ * id: OfferId;
8
+ * invitationSpec: import('./invitations.js').InvitationSpec;
9
+ * proposal: Proposal;
10
+ * offerArgs?: any;
14
11
  * }} OfferSpec
15
12
  */
16
13
 
@@ -18,180 +15,10 @@ import { makePaymentsHelper } from './payments.js';
18
15
  export const UNPUBLISHED_RESULT = 'UNPUBLISHED';
19
16
 
20
17
  /**
21
- * @typedef {import('./offers.js').OfferSpec & {
22
- * error?: string,
23
- * numWantsSatisfied?: number
24
- * result?: unknown | typeof UNPUBLISHED_RESULT,
25
- * payouts?: AmountKeywordRecord,
18
+ * @typedef {OfferSpec & {
19
+ * error?: string;
20
+ * numWantsSatisfied?: number;
21
+ * result?: unknown | typeof UNPUBLISHED_RESULT;
22
+ * payouts?: AmountKeywordRecord;
26
23
  * }} OfferStatus
27
24
  */
28
-
29
- /* eslint-disable jsdoc/check-param-names -- bug(?) with nested objects */
30
- /**
31
- * @param {object} opts
32
- * @param {ERef<ZoeService>} opts.zoe
33
- * @param {{ receive: (payment: *) => Promise<Amount> }} opts.depositFacet
34
- * @param {ERef<Issuer<'set'>>} opts.invitationIssuer
35
- * @param {object} opts.powers
36
- * @param {Pick<Console, 'info'| 'error'>} opts.powers.logger
37
- * @param {(spec: import('./invitations').InvitationSpec) => ERef<Invitation>} opts.powers.invitationFromSpec
38
- * @param {(brand: Brand) => Promise<import('./types').RemotePurse>} opts.powers.purseForBrand
39
- * @param {(status: OfferStatus) => void} opts.onStatusChange
40
- * @param {(offerId: string, invitationAmount: Amount<'set'>, invitationMakers: import('./types').RemoteInvitationMakers, publicSubscribers: import('./types').PublicSubscribers | import('@agoric/zoe/src/contractSupport').TopicsRecord ) => Promise<void>} opts.onNewContinuingOffer
41
- */
42
- export const makeOfferExecutor = ({
43
- zoe,
44
- depositFacet,
45
- invitationIssuer,
46
- powers,
47
- onStatusChange,
48
- onNewContinuingOffer,
49
- }) => {
50
- const { invitationFromSpec, logger, purseForBrand } = powers;
51
-
52
- return {
53
- /**
54
- * Take an offer description provided in capData, augment it with payments and call zoe.offer()
55
- *
56
- * @param {OfferSpec} offerSpec
57
- * @param {(seatRef: UserSeat) => void} onSeatCreated
58
- * @returns {Promise<void>} when the offer has been sent to Zoe; payouts go into this wallet's purses
59
- * @throws if any parts of the offer are determined to be invalid before calling Zoe's `offer()`
60
- */
61
- async executeOffer(offerSpec, onSeatCreated) {
62
- logger.info('starting executeOffer', offerSpec.id);
63
-
64
- const paymentsManager = makePaymentsHelper(purseForBrand, depositFacet);
65
-
66
- /** @type {OfferStatus} */
67
- let status = {
68
- ...offerSpec,
69
- };
70
- /** @param {Partial<OfferStatus>} changes */
71
- const updateStatus = changes => {
72
- status = { ...status, ...changes };
73
- onStatusChange(status);
74
- };
75
-
76
- /** @type {UserSeat} */
77
- let seatRef;
78
-
79
- const tryBody = async () => {
80
- // 1. Prepare values and validate synchronously.
81
- const { id, invitationSpec, proposal, offerArgs } = offerSpec;
82
-
83
- const invitation = invitationFromSpec(invitationSpec);
84
- const invitationAmount = await E(invitationIssuer).getAmountOf(
85
- invitation,
86
- );
87
-
88
- const paymentKeywordRecord = proposal?.give
89
- ? paymentsManager.withdrawGive(proposal.give)
90
- : undefined;
91
-
92
- // 2. Begin executing offer
93
- // No explicit signal to user that we reached here but if anything above
94
- // failed they'd get an 'error' status update.
95
-
96
- // eslint-disable-next-line @jessie.js/no-nested-await -- unconditional
97
- seatRef = await E(zoe).offer(
98
- invitation,
99
- proposal,
100
- paymentKeywordRecord,
101
- offerArgs,
102
- );
103
- logger.info(id, 'seated');
104
- onSeatCreated(seatRef);
105
-
106
- const publishResult = E.when(E(seatRef).getOfferResult(), result => {
107
- const passStyle = passStyleOf(result);
108
- logger.info(id, 'offerResult', passStyle, result);
109
- // someday can we get TS to type narrow based on the passStyleOf result match?
110
- switch (passStyle) {
111
- case 'bigint':
112
- case 'boolean':
113
- case 'null':
114
- case 'number':
115
- case 'string':
116
- case 'symbol':
117
- case 'undefined':
118
- updateStatus({ result });
119
- break;
120
- case 'copyRecord':
121
- // @ts-expect-error result narrowed by passStyle
122
- if ('invitationMakers' in result) {
123
- // save for continuing invitation offer
124
- void onNewContinuingOffer(
125
- String(id),
126
- invitationAmount,
127
- // @ts-expect-error result narrowed by passStyle
128
- result.invitationMakers,
129
- // @ts-expect-error result narrowed by passStyle
130
- result.publicSubscribers,
131
- );
132
- }
133
- // copyRecord is valid to publish but not safe as it may have private info
134
- updateStatus({ result: UNPUBLISHED_RESULT });
135
- break;
136
- default:
137
- // drop the result
138
- updateStatus({ result: UNPUBLISHED_RESULT });
139
- }
140
- });
141
-
142
- const publishWantsSatisfied = E.when(
143
- E(seatRef).numWantsSatisfied(),
144
- numSatisfied => {
145
- logger.info(id, 'numSatisfied', numSatisfied);
146
- if (numSatisfied === 0) {
147
- updateStatus({ numWantsSatisfied: 0 });
148
- }
149
- updateStatus({
150
- numWantsSatisfied: numSatisfied,
151
- });
152
- },
153
- );
154
-
155
- // This will block until all payouts succeed, but user will be updated
156
- // as each payout will trigger its corresponding purse notifier.
157
- const publishPayouts = E.when(E(seatRef).getPayouts(), payouts =>
158
- paymentsManager.depositPayouts(payouts).then(amountsOrDeferred => {
159
- updateStatus({ payouts: amountsOrDeferred });
160
- }),
161
- );
162
-
163
- // The offer is complete when these promises are resolved.
164
- // If any reject then executeOffer rejects and that must be handled.
165
- return Promise.all([
166
- publishResult,
167
- publishWantsSatisfied,
168
- publishPayouts,
169
- ]);
170
- };
171
-
172
- await tryBody().catch(err => {
173
- logger.error('OFFER ERROR:', err);
174
- // Notify the user
175
- updateStatus({ error: err.toString() });
176
- // Attempt to recover payments
177
- void paymentsManager.tryReclaimingWithdrawnPayments().then(result => {
178
- if (result) {
179
- updateStatus({ result });
180
- }
181
- });
182
- if (seatRef) {
183
- void E(seatRef)
184
- .hasExited()
185
- .then(hasExited => {
186
- if (!hasExited) {
187
- void E(seatRef).tryExit();
188
- }
189
- });
190
- }
191
- // propagate to caller
192
- throw err;
193
- });
194
- },
195
- };
196
- };
197
- harden(makeOfferExecutor);
@@ -0,0 +1,23 @@
1
+ export function upgradeWalletFactory({ consume: { walletFactoryStartResult, provisionPoolStartResult, chainStorage, walletBridgeManager: walletBridgeManagerP, }, }: BootstrapPowers & ChainBootstrapSpace, options: {
2
+ options: {
3
+ walletRef: VatSourceRef;
4
+ };
5
+ }): Promise<void>;
6
+ export function getManifestForUpgradeWallet(_powers: any, { walletRef }: {
7
+ walletRef: any;
8
+ }): {
9
+ manifest: {
10
+ [x: string]: {
11
+ consume: {
12
+ walletFactoryStartResult: string;
13
+ provisionPoolStartResult: string;
14
+ chainStorage: string;
15
+ walletBridgeManager: string;
16
+ };
17
+ };
18
+ };
19
+ options: {
20
+ walletRef: any;
21
+ };
22
+ };
23
+ //# sourceMappingURL=upgrade-wallet-factory2-proposal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-wallet-factory2-proposal.d.ts","sourceRoot":"","sources":["upgrade-wallet-factory2-proposal.js"],"names":[],"mappings":"AAWO,qKAJI,eAAe,GAAG,mBAAmB,WAE7C;IAA6C,OAAO,EAA5C;QAAE,SAAS,EAAE,YAAY,CAAA;KAAE;CACrC,iBAmCA;AAEM;;;;;;;;;;;;;;;;EAYL"}
@@ -0,0 +1,60 @@
1
+ // @ts-check
2
+ /// <reference types="@agoric/vats/src/core/types-ambient" />
3
+
4
+ import { E } from '@endo/far';
5
+ import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
6
+
7
+ /**
8
+ * @param {BootstrapPowers & ChainBootstrapSpace} powers
9
+ * @param {object} options
10
+ * @param {{ walletRef: VatSourceRef }} options.options
11
+ */
12
+ export const upgradeWalletFactory = async (
13
+ {
14
+ consume: {
15
+ walletFactoryStartResult,
16
+ provisionPoolStartResult,
17
+ chainStorage,
18
+ walletBridgeManager: walletBridgeManagerP,
19
+ },
20
+ },
21
+ options,
22
+ ) => {
23
+ const WALLET_STORAGE_PATH_SEGMENT = 'wallet';
24
+
25
+ const { walletRef } = options.options;
26
+
27
+ const [walletBridgeManager, walletStorageNode, ppFacets] = await Promise.all([
28
+ walletBridgeManagerP,
29
+ makeStorageNodeChild(chainStorage, WALLET_STORAGE_PATH_SEGMENT),
30
+ provisionPoolStartResult,
31
+ ]);
32
+ const walletReviver = await E(ppFacets.creatorFacet).getWalletReviver();
33
+
34
+ const privateArgs = {
35
+ storageNode: walletStorageNode,
36
+ walletBridgeManager,
37
+ walletReviver,
38
+ };
39
+
40
+ const { adminFacet } = await walletFactoryStartResult;
41
+
42
+ assert(walletRef.bundleID);
43
+ await E(adminFacet).upgradeContract(walletRef.bundleID, privateArgs);
44
+
45
+ console.log(`Successfully upgraded WalletFactory`);
46
+ };
47
+
48
+ export const getManifestForUpgradeWallet = (_powers, { walletRef }) => ({
49
+ manifest: {
50
+ [upgradeWalletFactory.name]: {
51
+ consume: {
52
+ walletFactoryStartResult: 'walletFactoryStartResult',
53
+ provisionPoolStartResult: 'provisionPoolStartResult',
54
+ chainStorage: 'chainStorage',
55
+ walletBridgeManager: 'walletBridgeManager',
56
+ },
57
+ },
58
+ },
59
+ options: { walletRef },
60
+ });
@@ -0,0 +1,17 @@
1
+ export function upgradeWalletFactory({ consume: { contractKits, governedContractKits, chainStorage, walletBridgeManager: walletBridgeManagerP, }, instance: { consume: { walletFactory: wfInstanceP, provisionPool: ppInstanceP }, }, }: BootstrapPowers, config: {
2
+ options: {
3
+ walletFactoryRef: VatSourceRef & {
4
+ bundleID: string;
5
+ };
6
+ };
7
+ }): Promise<void>;
8
+ export function publishAgoricBrandsDisplayInfo({ consume: { agoricNames, board, chainStorage }, }: BootstrapPowers): Promise<void>;
9
+ export function getManifestForUpgrade(_powers: any, { walletFactoryRef }: {
10
+ walletFactoryRef: any;
11
+ }): {
12
+ manifest: import("@agoric/vats/src/core/lib-boot").BootstrapManifest;
13
+ options: {
14
+ walletFactoryRef: any;
15
+ };
16
+ };
17
+ //# sourceMappingURL=upgrade-walletFactory-proposal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-walletFactory-proposal.d.ts","sourceRoot":"","sources":["upgrade-walletFactory-proposal.js"],"names":[],"mappings":"AAoBO,yOAJI,eAAe,UAEvB;IAA0E,OAAO,EAAzE;QAAE,gBAAgB,EAAE,YAAY,GAAG;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;CACnE,iBAiDA;AAMM,mGAFI,eAAe,iBAwBzB;AAyBM;;;;;;;EAKN"}
@@ -0,0 +1,127 @@
1
+ // @ts-check
2
+ import { E } from '@endo/far';
3
+ import { makeMarshal } from '@endo/marshal';
4
+ import { allValues } from '@agoric/internal';
5
+
6
+ console.warn('upgrade-walletFactory-proposal.js module evaluating');
7
+
8
+ const { Fail } = assert;
9
+
10
+ // vstorage paths under published.*
11
+ const WALLET_STORAGE_PATH_SEGMENT = 'wallet';
12
+ const BOARD_AUX = 'boardAux';
13
+
14
+ const marshalData = makeMarshal(_val => Fail`data only`);
15
+
16
+ /**
17
+ * @param {BootstrapPowers} powers
18
+ * @param {object} config
19
+ * @param {{ walletFactoryRef: VatSourceRef & { bundleID: string } }} config.options
20
+ */
21
+ export const upgradeWalletFactory = async (
22
+ {
23
+ consume: {
24
+ contractKits,
25
+ governedContractKits,
26
+ chainStorage,
27
+ walletBridgeManager: walletBridgeManagerP,
28
+ },
29
+ instance: {
30
+ consume: { walletFactory: wfInstanceP, provisionPool: ppInstanceP },
31
+ },
32
+ },
33
+ config,
34
+ ) => {
35
+ console.log('upgradeWalletFactory: config', config);
36
+ const { walletFactoryRef } = config.options;
37
+
38
+ // console.log('upgradeWalletFactory: awaiting instances etc.');
39
+ const { wfInstance, ppInstance, walletBridgeManager, storageNode } =
40
+ await allValues({
41
+ wfInstance: wfInstanceP,
42
+ ppInstance: ppInstanceP,
43
+ walletBridgeManager: walletBridgeManagerP,
44
+ // @ts-expect-error chainStorage is only falsy in testing
45
+ storageNode: E(chainStorage).makeChildNode(WALLET_STORAGE_PATH_SEGMENT),
46
+ });
47
+ // console.log('upgradeWalletFactory: awaiting contract kits');
48
+ const { wfKit, ppKit } = await allValues({
49
+ wfKit: E(contractKits).get(wfInstance),
50
+ ppKit: E(governedContractKits).get(ppInstance),
51
+ });
52
+ // console.log('upgradeWalletFactory: awaiting walletReviver');
53
+ const walletReviver = await E(ppKit.creatorFacet).getWalletReviver();
54
+ const newPrivateArgs = harden({
55
+ storageNode,
56
+ walletBridgeManager,
57
+ walletReviver,
58
+ });
59
+
60
+ console.log(
61
+ 'upgradeWalletFactory: upgrading with newPrivateArgs',
62
+ newPrivateArgs,
63
+ );
64
+ await E(wfKit.adminFacet).upgradeContract(
65
+ walletFactoryRef.bundleID,
66
+ newPrivateArgs,
67
+ );
68
+ console.log('upgradeWalletFactory: done');
69
+ };
70
+ harden(upgradeWalletFactory);
71
+
72
+ /**
73
+ * @param {BootstrapPowers} powers
74
+ */
75
+ export const publishAgoricBrandsDisplayInfo = async ({
76
+ consume: { agoricNames, board, chainStorage },
77
+ }) => {
78
+ // chainStorage type includes undefined, which doesn't apply here.
79
+ // @ts-expect-error UNTIL https://github.com/Agoric/agoric-sdk/issues/8247
80
+ const boardAux = E(chainStorage).makeChildNode(BOARD_AUX);
81
+ const publishBrandInfo = async brand => {
82
+ const [id, displayInfo, allegedName] = await Promise.all([
83
+ E(board).getId(brand),
84
+ E(brand).getDisplayInfo(),
85
+ E(brand).getAllegedName(),
86
+ ]);
87
+ const node = E(boardAux).makeChildNode(id);
88
+ const aux = marshalData.toCapData(harden({ allegedName, displayInfo }));
89
+ await E(node).setValue(JSON.stringify(aux));
90
+ };
91
+
92
+ /** @type {ERef<import('@agoric/vats').NameHub>} */
93
+ const brandHub = E(agoricNames).lookup('brand');
94
+ const brands = await E(brandHub).values();
95
+ // tolerate failure; in particular, for the timer brand
96
+ await Promise.allSettled(brands.map(publishBrandInfo));
97
+ };
98
+ harden(publishAgoricBrandsDisplayInfo);
99
+
100
+ /** @type {import('@agoric/vats/src/core/lib-boot').BootstrapManifest} */
101
+ const manifest = {
102
+ [upgradeWalletFactory.name]: {
103
+ // include rationale for closely-held, high authority capabilities
104
+ consume: {
105
+ contractKits: `to upgrade walletFactory using its adminFacet`,
106
+ governedContractKits:
107
+ 'to get walletReviver from provisionPool.creatorFacet',
108
+ chainStorage: 'to allow walletFactory to (continue) write to vstorage',
109
+ walletBridgeManager: 'to handle bridged cosmos SpendAction messages',
110
+ },
111
+ // widely-shared, low authority instance handles need no rationale
112
+ instance: {
113
+ consume: { walletFactory: true, provisionPool: true },
114
+ },
115
+ },
116
+ [publishAgoricBrandsDisplayInfo.name]: {
117
+ consume: { agoricNames: true, board: true, chainStorage: true },
118
+ },
119
+ };
120
+ harden(manifest);
121
+
122
+ export const getManifestForUpgrade = (_powers, { walletFactoryRef }) => {
123
+ return harden({
124
+ manifest,
125
+ options: { walletFactoryRef },
126
+ });
127
+ };