@agoric/smart-wallet 0.5.4-other-dev-3eb1a1d.0 → 0.5.4-other-dev-d15096d.0.d15096d
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 +35 -30
- package/src/index.js +4 -0
- package/src/invitations.d.ts +6 -2
- package/src/invitations.d.ts.map +1 -1
- package/src/invitations.js +10 -3
- package/src/marshal-contexts.d.ts +2 -1
- package/src/marshal-contexts.d.ts.map +1 -1
- package/src/marshal-contexts.js +1 -0
- package/src/offerWatcher.d.ts +8 -4
- package/src/offerWatcher.d.ts.map +1 -1
- package/src/offerWatcher.js +23 -9
- package/src/offers.d.ts +59 -3
- package/src/offers.d.ts.map +1 -1
- package/src/offers.js +33 -2
- package/src/proposals/upgrade-wallet-factory2-proposal.js +3 -2
- package/src/proposals/upgrade-walletFactory-proposal.js +7 -2
- package/src/smartWallet.d.ts +63 -24
- package/src/smartWallet.d.ts.map +1 -1
- package/src/smartWallet.js +229 -51
- package/src/typeGuards.js +29 -1
- package/src/types.d.ts +3 -2
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +4 -4
- package/src/utils.d.ts +18 -8
- package/src/utils.d.ts.map +1 -1
- package/src/utils.js +12 -8
- package/src/walletFactory.d.ts +28 -20
- package/src/walletFactory.d.ts.map +1 -1
- package/src/walletFactory.js +37 -31
- package/src/proposals/upgrade-wallet-factory2-proposal.d.ts +0 -23
- package/src/proposals/upgrade-wallet-factory2-proposal.d.ts.map +0 -1
- package/src/proposals/upgrade-walletFactory-proposal.d.ts +0 -17
- package/src/proposals/upgrade-walletFactory-proposal.d.ts.map +0 -1
package/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,oCAAqC,iBAAiB,CAAC;AAKhD,2DADK,KAAK,CAAC,KAAK,CAAC;;;wBAaH,OAAO;yBACN,MAAM;sBACT,QAAQ;;;;;2BAOd,YAAY,GAAG,EAAE;EA+D7B;AAaM,yCAHI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,oBAC9B,KAAK,CAAC,KAAK,CAAC;;oBAnFF,OAAO;qBACN,MAAM;kBACT,QAAQ;;;;EA4F1B;AAMM,wCAHI,SAAS,GAAG,CAAC,iBAYvB;AAQM,mDAHI,iBAAiB,GAAG,YAAY,GAC9B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAY/C;mCAtDa,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,OAAO,CAAC;6BAjG3B,aAAa;iCAAb,aAAa;kCACrB,kBAAkB;8BACtB,iBAAiB;uCACR,YAAY;kCACjB,0CAA0C"}
|
package/src/utils.js
CHANGED
|
@@ -2,7 +2,13 @@ import { deeplyFulfilledObject, objectMap, makeTracer } from '@agoric/internal';
|
|
|
2
2
|
import { observeIteration, subscribeEach } from '@agoric/notifier';
|
|
3
3
|
import { E } from '@endo/far';
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @import {OfferId, OfferStatus} from './offers.js';
|
|
7
|
+
* @import {UpdateRecord} from './smartWallet.js';
|
|
8
|
+
* @import {Follower} from '@agoric/casting';
|
|
9
|
+
* @import {PublicSubscribers} from './types.js';
|
|
10
|
+
* @import {TopicsRecord} from '@agoric/zoe/src/contractSupport/index.js';
|
|
11
|
+
*/
|
|
6
12
|
|
|
7
13
|
export const NO_SMART_WALLET_ERROR = 'no smart wallet';
|
|
8
14
|
|
|
@@ -19,7 +25,7 @@ export const makeWalletStateCoalescer = (invitationBrand = undefined) => {
|
|
|
19
25
|
* keyed by description; xxx assumes unique
|
|
20
26
|
*
|
|
21
27
|
* @type {Map<
|
|
22
|
-
*
|
|
28
|
+
* string,
|
|
23
29
|
* {
|
|
24
30
|
* acceptedIn: OfferId;
|
|
25
31
|
* description: string;
|
|
@@ -30,8 +36,7 @@ export const makeWalletStateCoalescer = (invitationBrand = undefined) => {
|
|
|
30
36
|
const invitationsReceived = new Map();
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
|
-
* @param {
|
|
34
|
-
* than previous
|
|
39
|
+
* @param {UpdateRecord | {}} updateRecord newer than previous
|
|
35
40
|
*/
|
|
36
41
|
const update = updateRecord => {
|
|
37
42
|
if (!('updated' in updateRecord)) {
|
|
@@ -104,7 +109,7 @@ export const makeWalletStateCoalescer = (invitationBrand = undefined) => {
|
|
|
104
109
|
* If this proves to be a problem we can add an option to this or a related
|
|
105
110
|
* utility to reset state from RPC.
|
|
106
111
|
*
|
|
107
|
-
* @param {ERef<Subscriber<
|
|
112
|
+
* @param {ERef<Subscriber<UpdateRecord>>} updates
|
|
108
113
|
* @param {Brand<'set'>} [invitationBrand]
|
|
109
114
|
*/
|
|
110
115
|
export const coalesceUpdates = (updates, invitationBrand) => {
|
|
@@ -119,7 +124,7 @@ export const coalesceUpdates = (updates, invitationBrand) => {
|
|
|
119
124
|
};
|
|
120
125
|
|
|
121
126
|
/**
|
|
122
|
-
* @param {
|
|
127
|
+
* @param {Follower<any>} follower
|
|
123
128
|
* @throws if there is no first height
|
|
124
129
|
*/
|
|
125
130
|
export const assertHasData = async follower => {
|
|
@@ -136,8 +141,7 @@ export const assertHasData = async follower => {
|
|
|
136
141
|
/**
|
|
137
142
|
* Handles the case of falsy argument so the caller can consistently await.
|
|
138
143
|
*
|
|
139
|
-
* @param {
|
|
140
|
-
* | import('@agoric/zoe/src/contractSupport/index.js').TopicsRecord} [subscribers]
|
|
144
|
+
* @param {PublicSubscribers | TopicsRecord} [subscribers]
|
|
141
145
|
* @returns {ERef<Record<string, string>> | null}
|
|
142
146
|
*/
|
|
143
147
|
export const objectMapStoragePath = subscribers => {
|
package/src/walletFactory.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export namespace customTermsShape {
|
|
2
|
-
let agoricNames:
|
|
3
|
-
let board:
|
|
4
|
-
let assetPublisher:
|
|
2
|
+
let agoricNames: Pattern;
|
|
3
|
+
let board: Pattern;
|
|
4
|
+
let assetPublisher: Pattern;
|
|
5
5
|
}
|
|
6
6
|
export const privateArgsShape: import("@endo/patterns").Matcher;
|
|
7
|
-
export function publishDepositFacet(address: string, wallet:
|
|
7
|
+
export function publishDepositFacet(address: string, wallet: SmartWallet, namesByAddressAdmin: ERef<NameAdmin>): Promise<unknown>;
|
|
8
8
|
export function makeAssetRegistry(assetPublisher: AssetPublisher): {
|
|
9
9
|
/** @param {Brand} brand */
|
|
10
10
|
has: (brand: Brand) => boolean;
|
|
@@ -13,47 +13,55 @@ export function makeAssetRegistry(assetPublisher: AssetPublisher): {
|
|
|
13
13
|
brand: Brand;
|
|
14
14
|
displayInfo: DisplayInfo;
|
|
15
15
|
issuer: Issuer;
|
|
16
|
-
petname:
|
|
16
|
+
petname: Petname;
|
|
17
17
|
};
|
|
18
18
|
values: () => Iterable<{
|
|
19
19
|
brand: Brand;
|
|
20
20
|
displayInfo: DisplayInfo;
|
|
21
21
|
issuer: Issuer;
|
|
22
|
-
petname:
|
|
22
|
+
petname: Petname;
|
|
23
23
|
}>;
|
|
24
24
|
};
|
|
25
25
|
export function prepare(zcf: ZCF<SmartWalletContractTerms>, privateArgs: {
|
|
26
|
-
storageNode:
|
|
27
|
-
walletBridgeManager?: ERef<
|
|
26
|
+
storageNode: ERemote<StorageNode>;
|
|
27
|
+
walletBridgeManager?: ERef<ScopedBridgeManager<"wallet">>;
|
|
28
28
|
walletReviver?: ERef<WalletReviver>;
|
|
29
|
-
}, baggage:
|
|
29
|
+
}, baggage: Baggage): Promise<{
|
|
30
30
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
31
31
|
/**
|
|
32
32
|
* @param {string} address
|
|
33
|
-
* @param {ERef<
|
|
34
|
-
* @param {ERef<
|
|
35
|
-
* @returns {Promise<
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* wallet along with a flag to distinguish between looking up an existing
|
|
39
|
-
* wallet and creating a new one.
|
|
33
|
+
* @param {ERef<Bank>} bank
|
|
34
|
+
* @param {ERef<NameAdmin>} namesByAddressAdmin
|
|
35
|
+
* @returns {Promise<[wallet: SmartWallet, isNew: boolean]>} wallet along
|
|
36
|
+
* with a flag to distinguish between looking up an existing wallet and
|
|
37
|
+
* creating a new one.
|
|
40
38
|
*/
|
|
41
|
-
provideSmartWallet(address: string, bank: ERef<
|
|
39
|
+
provideSmartWallet(address: string, bank: ERef<Bank>, namesByAddressAdmin: ERef<NameAdmin>): Promise<[wallet: SmartWallet, isNew: boolean]>;
|
|
42
40
|
}>;
|
|
43
41
|
}>;
|
|
44
42
|
export type SmartWalletContractTerms = {
|
|
45
43
|
agoricNames: ERef<NameHub>;
|
|
46
|
-
board: ERef<
|
|
44
|
+
board: ERef<Board>;
|
|
47
45
|
assetPublisher: AssetPublisher;
|
|
48
46
|
};
|
|
49
47
|
export type AssetPublisher = {
|
|
50
|
-
getAssetSubscription: () => ERef<IterableEachTopic<
|
|
48
|
+
getAssetSubscription: () => ERef<IterableEachTopic<AssetDescriptor>>;
|
|
51
49
|
};
|
|
52
50
|
export type IsRevive = boolean;
|
|
53
51
|
export type WalletReviver = {
|
|
54
|
-
reviveWallet: (address: string) => Promise<
|
|
52
|
+
reviveWallet: (address: string) => Promise<SmartWallet>;
|
|
55
53
|
ackWallet: (address: string) => IsRevive;
|
|
56
54
|
};
|
|
57
55
|
export type start = typeof prepare;
|
|
56
|
+
import type { SmartWallet } from './smartWallet.js';
|
|
57
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
58
|
+
import type { Petname } from './types.js';
|
|
59
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
60
|
+
import type { ERemote } from '@agoric/internal';
|
|
61
|
+
import type { ScopedBridgeManager } from '@agoric/vats';
|
|
62
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
63
|
+
import type { Bank } from '@agoric/vats/src/vat-bank.js';
|
|
58
64
|
import type { NameHub } from '@agoric/vats';
|
|
65
|
+
import type { Board } from '@agoric/vats';
|
|
66
|
+
import type { AssetDescriptor } from '@agoric/vats/src/vat-bank.js';
|
|
59
67
|
//# sourceMappingURL=walletFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletFactory.d.ts","sourceRoot":"","sources":["walletFactory.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"walletFactory.d.ts","sourceRoot":"","sources":["walletFactory.js"],"names":[],"mappings":";;;;;AA4CA,gEAKE;AAYK,6CAJI,MAAM,UACN,WAAW,uBACX,IAAI,CAAC,SAAS,CAAC,oBAezB;AAWM,kDAFI,cAAc;IAyCrB,2BAA2B;iBAAf,KAAK;IAEjB,2BAA2B;iBAAf,KAAK;eArCP,KAAK;qBACC,WAAW;gBAChB,MAAM;iBACL,OAAO;;;eAHT,KAAK;qBACC,WAAW;gBAChB,MAAM;iBACL,OAAO;;EAuCtB;AAmCM,6BARI,GAAG,CAAC,wBAAwB,CAAC,eAC7B;IACN,WAAW,EAAE,QAAQ,WAAW,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,IAAI,CAAC,oBAAoB,QAAQ,CAAC,CAAC,CAAC;IAC1D,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;CACrC,WACO,OAAO;;QAkHZ;;;;;;;WAOG;oCANQ,MAAM,QACN,IAAI,CAAC,IAAI,CAAC,uBACV,IAAI,CAAC,SAAS,CAAC,GACb,OAAO,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;;GAqDhE;uCAzMY;IACR,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;CAChC;6BAGS;IACR,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC;CACtE;uBAGS,OAAO;4BAEP;IACR,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IACxD,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC;CAC1C;oBA6LU,OAAO,OAAO;iCA3TE,kBAAkB;+BACpB,cAAc;6BAChB,YAAY;iCALR,0CAA0C;6BAD9C,kBAAkB;yCASN,cAAc;6BAC1B,kBAAkB;0BAErB,8BAA8B;6BAT3B,cAAc;2BAIhB,cAAc;qCACJ,8BAA8B"}
|
package/src/walletFactory.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { makeTracer, WalletName } from '@agoric/internal';
|
|
11
|
+
import { wrapRemoteMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
11
12
|
import { observeIteration, subscribeEach } from '@agoric/notifier';
|
|
12
13
|
import { M, makeExo, makeScalarMapStore, mustMatch } from '@agoric/store';
|
|
13
14
|
import { makeAtomicProvider } from '@agoric/store/src/stores/store-utils.js';
|
|
@@ -17,7 +18,21 @@ import { E } from '@endo/far';
|
|
|
17
18
|
import { prepareSmartWallet } from './smartWallet.js';
|
|
18
19
|
import { shape } from './typeGuards.js';
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* @import {ERemote} from '@agoric/internal';
|
|
23
|
+
* @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
|
|
24
|
+
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
25
|
+
* @import {NameHub} from '@agoric/vats';
|
|
26
|
+
* @import {SmartWallet} from './smartWallet.js';
|
|
27
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
28
|
+
* @import {Petname} from './types.js';
|
|
29
|
+
* @import {Board} from '@agoric/vats';
|
|
30
|
+
* @import {AssetDescriptor} from '@agoric/vats/src/vat-bank.js';
|
|
31
|
+
* @import {ScopedBridgeManager} from '@agoric/vats';
|
|
32
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
33
|
+
* @import {WalletBridgeMsg} from './types.js';
|
|
34
|
+
* @import {Bank} from '@agoric/vats/src/vat-bank.js';
|
|
35
|
+
*/
|
|
21
36
|
|
|
22
37
|
const trace = makeTracer('WltFct');
|
|
23
38
|
|
|
@@ -41,8 +56,8 @@ const WALLETS_BY_ADDRESS = 'walletsByAddress';
|
|
|
41
56
|
* already done.
|
|
42
57
|
*
|
|
43
58
|
* @param {string} address
|
|
44
|
-
* @param {
|
|
45
|
-
* @param {ERef<
|
|
59
|
+
* @param {SmartWallet} wallet
|
|
60
|
+
* @param {ERef<NameAdmin>} namesByAddressAdmin
|
|
46
61
|
*/
|
|
47
62
|
export const publishDepositFacet = async (
|
|
48
63
|
address,
|
|
@@ -75,7 +90,7 @@ export const makeAssetRegistry = assetPublisher => {
|
|
|
75
90
|
* brand: Brand;
|
|
76
91
|
* displayInfo: DisplayInfo;
|
|
77
92
|
* issuer: Issuer;
|
|
78
|
-
* petname:
|
|
93
|
+
* petname: Petname;
|
|
79
94
|
* }} BrandDescriptor
|
|
80
95
|
* For use by clients to describe brands to users. Includes `displayInfo` to
|
|
81
96
|
* save a remote call.
|
|
@@ -119,24 +134,20 @@ export const makeAssetRegistry = assetPublisher => {
|
|
|
119
134
|
/**
|
|
120
135
|
* @typedef {{
|
|
121
136
|
* agoricNames: ERef<NameHub>;
|
|
122
|
-
* board: ERef<
|
|
137
|
+
* board: ERef<Board>;
|
|
123
138
|
* assetPublisher: AssetPublisher;
|
|
124
139
|
* }} SmartWalletContractTerms
|
|
125
140
|
*
|
|
126
141
|
*
|
|
127
142
|
* @typedef {{
|
|
128
|
-
* getAssetSubscription: () => ERef<
|
|
129
|
-
* IterableEachTopic<import('@agoric/vats/src/vat-bank.js').AssetDescriptor>
|
|
130
|
-
* >;
|
|
143
|
+
* getAssetSubscription: () => ERef<IterableEachTopic<AssetDescriptor>>;
|
|
131
144
|
* }} AssetPublisher
|
|
132
145
|
*
|
|
133
146
|
*
|
|
134
147
|
* @typedef {boolean} IsRevive
|
|
135
148
|
*
|
|
136
149
|
* @typedef {{
|
|
137
|
-
* reviveWallet: (
|
|
138
|
-
* address: string,
|
|
139
|
-
* ) => Promise<import('./smartWallet.js').SmartWallet>;
|
|
150
|
+
* reviveWallet: (address: string) => Promise<SmartWallet>;
|
|
140
151
|
* ackWallet: (address: string) => IsRevive;
|
|
141
152
|
* }} WalletReviver
|
|
142
153
|
*/
|
|
@@ -147,13 +158,11 @@ export const makeAssetRegistry = assetPublisher => {
|
|
|
147
158
|
/**
|
|
148
159
|
* @param {ZCF<SmartWalletContractTerms>} zcf
|
|
149
160
|
* @param {{
|
|
150
|
-
* storageNode:
|
|
151
|
-
* walletBridgeManager?: ERef<
|
|
152
|
-
* import('@agoric/vats').ScopedBridgeManager<'wallet'>
|
|
153
|
-
* >;
|
|
161
|
+
* storageNode: ERemote<StorageNode>;
|
|
162
|
+
* walletBridgeManager?: ERef<ScopedBridgeManager<'wallet'>>;
|
|
154
163
|
* walletReviver?: ERef<WalletReviver>;
|
|
155
164
|
* }} privateArgs
|
|
156
|
-
* @param {
|
|
165
|
+
* @param {Baggage} baggage
|
|
157
166
|
*/
|
|
158
167
|
export const prepare = async (zcf, privateArgs, baggage) => {
|
|
159
168
|
const upgrading = baggage.has(WALLETS_BY_ADDRESS);
|
|
@@ -162,7 +171,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
162
171
|
const zoe = zcf.getZoeService();
|
|
163
172
|
const { storageNode, walletBridgeManager, walletReviver } = privateArgs;
|
|
164
173
|
|
|
165
|
-
/** @type {MapStore<string,
|
|
174
|
+
/** @type {MapStore<string, SmartWallet>} */
|
|
166
175
|
const walletsByAddress = provideDurableMapStore(baggage, WALLETS_BY_ADDRESS);
|
|
167
176
|
const provider = makeAtomicProvider(walletsByAddress);
|
|
168
177
|
|
|
@@ -187,8 +196,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
187
196
|
* Once the owner is known, this calls handleBridgeAction which ensures
|
|
188
197
|
* that all errors are published in the owner wallet's vstorage path.
|
|
189
198
|
*
|
|
190
|
-
* @param {
|
|
191
|
-
* shape.WalletBridgeMsg
|
|
199
|
+
* @param {WalletBridgeMsg} obj validated by shape.WalletBridgeMsg
|
|
192
200
|
* @returns {Promise<void>}
|
|
193
201
|
*/
|
|
194
202
|
fromBridge: async obj => {
|
|
@@ -226,7 +234,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
226
234
|
invitationIssuer,
|
|
227
235
|
invitationBrand,
|
|
228
236
|
invitationDisplayInfo,
|
|
229
|
-
publicMarshaller,
|
|
237
|
+
publicMarshaller: remotePublicMarshaller,
|
|
230
238
|
} = await provideAll(baggage, {
|
|
231
239
|
invitationIssuer: () => invitationIssuerP,
|
|
232
240
|
invitationBrand: () => E(invitationIssuerP).getBrand(),
|
|
@@ -237,12 +245,14 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
237
245
|
|
|
238
246
|
const registry = makeAssetRegistry(assetPublisher);
|
|
239
247
|
|
|
248
|
+
const publicCachingMarshaller = wrapRemoteMarshaller(remotePublicMarshaller);
|
|
249
|
+
|
|
240
250
|
const shared = harden({
|
|
241
251
|
agoricNames,
|
|
242
252
|
invitationBrand,
|
|
243
253
|
invitationDisplayInfo,
|
|
244
254
|
invitationIssuer,
|
|
245
|
-
publicMarshaller,
|
|
255
|
+
publicMarshaller: publicCachingMarshaller,
|
|
246
256
|
registry,
|
|
247
257
|
zoe,
|
|
248
258
|
});
|
|
@@ -268,21 +278,17 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
268
278
|
{
|
|
269
279
|
/**
|
|
270
280
|
* @param {string} address
|
|
271
|
-
* @param {ERef<
|
|
272
|
-
* @param {ERef<
|
|
273
|
-
* @returns {Promise<
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
* wallet along with a flag to distinguish between looking up an existing
|
|
277
|
-
* wallet and creating a new one.
|
|
281
|
+
* @param {ERef<Bank>} bank
|
|
282
|
+
* @param {ERef<NameAdmin>} namesByAddressAdmin
|
|
283
|
+
* @returns {Promise<[wallet: SmartWallet, isNew: boolean]>} wallet along
|
|
284
|
+
* with a flag to distinguish between looking up an existing wallet and
|
|
285
|
+
* creating a new one.
|
|
278
286
|
*/
|
|
279
287
|
provideSmartWallet(address, bank, namesByAddressAdmin) {
|
|
280
288
|
let isNew = false;
|
|
281
289
|
|
|
282
290
|
/**
|
|
283
|
-
* @type {(
|
|
284
|
-
* address: string,
|
|
285
|
-
* ) => Promise<import('./smartWallet.js').SmartWallet>}
|
|
291
|
+
* @type {(address: string) => Promise<SmartWallet>}
|
|
286
292
|
*/
|
|
287
293
|
const maker = async _address => {
|
|
288
294
|
const invitationPurse = await E(invitationIssuer).makeEmptyPurse();
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-walletFactory-proposal.d.ts","sourceRoot":"","sources":["upgrade-walletFactory-proposal.js"],"names":[],"mappings":"AAmBO,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"}
|