@agoric/vats 0.15.2-dev-776528e.0.776528e → 0.15.2-dev-5ff5e7a.0.5ff5e7a
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 +25 -25
- package/source-spec-registry.d.ts +16 -4
- package/source-spec-registry.d.ts.map +1 -1
- package/source-spec-registry.js +5 -0
- package/src/bridge-target.d.ts +61 -16
- package/src/bridge-target.d.ts.map +1 -1
- package/src/bridge-target.js +1 -0
- package/src/bridge.d.ts +23 -6
- package/src/bridge.d.ts.map +1 -1
- package/src/bridge.js +31 -4
- package/src/core/boot-chain.d.ts +104 -7
- package/src/core/boot-chain.d.ts.map +1 -1
- package/src/core/startWalletFactory.d.ts +1 -11
- package/src/core/startWalletFactory.d.ts.map +1 -1
- package/src/core/startWalletFactory.js +3 -22
- package/src/core/types.d.ts +3 -3
- package/src/core/types.d.ts.map +1 -1
- package/src/core/types.js +6 -3
- package/src/core/utils.d.ts +119 -16
- package/src/core/utils.d.ts.map +1 -1
- package/src/core/utils.js +11 -0
- package/src/lib-board.d.ts +34 -2
- package/src/lib-board.d.ts.map +1 -1
- package/src/localchain.d.ts +115 -14
- package/src/localchain.d.ts.map +1 -1
- package/src/localchain.js +7 -1
- package/src/nameHub.d.ts +26 -14
- package/src/nameHub.d.ts.map +1 -1
- package/src/nameHub.js +19 -3
- package/src/proposals/invite-committee.d.ts +88 -0
- package/src/proposals/invite-committee.d.ts.map +1 -0
- package/src/proposals/invite-committee.js +207 -0
- package/src/proposals/reserve-then-deposit.d.ts +6 -0
- package/src/proposals/reserve-then-deposit.d.ts.map +1 -0
- package/src/proposals/reserve-then-deposit.js +83 -0
- package/src/proposals/restart-vats-proposal.d.ts +2 -21
- package/src/proposals/restart-vats-proposal.d.ts.map +1 -1
- package/src/proposals/restart-vats-proposal.js +5 -27
- package/src/proposals/start-econ-committee.d.ts +91 -0
- package/src/proposals/start-econ-committee.d.ts.map +1 -0
- package/src/proposals/start-econ-committee.js +148 -0
- package/src/provisionPoolKit.d.ts +24 -5
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/transfer.d.ts +33 -3
- package/src/transfer.d.ts.map +1 -1
- package/src/transfer.js +1 -0
- package/src/types.d.ts +1 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.js +4 -1
- package/src/vat-bank.d.ts +107 -26
- package/src/vat-bank.d.ts.map +1 -1
- package/src/vat-bank.js +14 -9
- package/src/vat-board.d.ts +42 -6
- package/src/vat-board.d.ts.map +1 -1
- package/src/vat-bridge.d.ts +2 -16
- package/src/vat-bridge.d.ts.map +1 -1
- package/src/vat-localchain.d.ts +22 -2
- package/src/vat-localchain.d.ts.map +1 -1
- package/src/vat-network.d.ts +140 -24
- package/src/vat-network.d.ts.map +1 -1
- package/src/vat-transfer.d.ts +78 -4
- package/src/vat-transfer.d.ts.map +1 -1
- package/src/virtual-purse.d.ts +555 -39
- package/src/virtual-purse.d.ts.map +1 -1
- package/src/virtual-purse.js +32 -18
- package/tools/bank-utils.d.ts +21 -3
- package/tools/bank-utils.d.ts.map +1 -1
- package/tools/board-utils.d.ts +21 -3
- package/tools/board-utils.d.ts.map +1 -1
- package/tools/fake-bridge.js +4 -4
- package/src/proposals/upgrade-asset-reserve-proposal.d.ts +0 -40
- package/src/proposals/upgrade-asset-reserve-proposal.d.ts.map +0 -1
- package/src/proposals/upgrade-asset-reserve-proposal.js +0 -99
- package/src/proposals/upgrade-psm-proposal.d.ts +0 -35
- package/src/proposals/upgrade-psm-proposal.d.ts.map +0 -1
- package/src/proposals/upgrade-psm-proposal.js +0 -80
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function reserveThenGetNamePaths(nameAdmin: ERef<NameAdmin>, paths: string[][]): Promise<unknown[]>;
|
|
2
|
+
export function reserveThenDeposit(debugName: string, namesByAddressAdmin: ERef<NameAdmin>, addr: string, payments: ERef<Payment>[]): Promise<void>;
|
|
3
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
4
|
+
import type { ERef } from '@endo/far';
|
|
5
|
+
import type { Payment } from '@agoric/ertp';
|
|
6
|
+
//# sourceMappingURL=reserve-then-deposit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reserve-then-deposit.d.ts","sourceRoot":"","sources":["reserve-then-deposit.js"],"names":[],"mappings":"AAmBO,mDAJI,KAAK,SAAS,CAAC,SACf,MAAM,EAAE,EAAE,GACR,OAAO,CAAC,OAAO,EAAE,CAAC,CAgC9B;AAWM,8CALI,MAAM,uBACN,KAAK,SAAS,CAAC,QACf,MAAM,YACN,KAAK,OAAO,CAAC,EAAE,iBAwBzB;+BA5E2B,cAAc;0BADnB,WAAW;6BAER,cAAc"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Fail } from '@endo/errors';
|
|
2
|
+
import { E } from '@endo/far';
|
|
3
|
+
import { WalletName } from '@agoric/internal';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @import {ERef} from '@endo/far';
|
|
7
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
8
|
+
* @import {Payment} from '@agoric/ertp';
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Reserve and look up a list of name paths, waiting for each path segment to be
|
|
13
|
+
* reserved before resolving. Relocated from `inter-protocol` (refs
|
|
14
|
+
* #12719); used by the economicCommittee/charter bootstrap proposals.
|
|
15
|
+
*
|
|
16
|
+
* @param {ERef<NameAdmin>} nameAdmin
|
|
17
|
+
* @param {string[][]} paths
|
|
18
|
+
* @returns {Promise<unknown[]>}
|
|
19
|
+
*/
|
|
20
|
+
export const reserveThenGetNamePaths = async (nameAdmin, paths) => {
|
|
21
|
+
/**
|
|
22
|
+
* @param {ERef<NameAdmin>} nextAdmin
|
|
23
|
+
* @param {string[]} path
|
|
24
|
+
* @returns {Promise<unknown>}
|
|
25
|
+
*/
|
|
26
|
+
const nextPath = async (nextAdmin, path) => {
|
|
27
|
+
const [nextName, ...rest] = path;
|
|
28
|
+
assert.typeof(nextName, 'string');
|
|
29
|
+
|
|
30
|
+
// Ensure we wait for the next name until it exists.
|
|
31
|
+
await E(nextAdmin).reserve(nextName);
|
|
32
|
+
|
|
33
|
+
if (rest.length === 0) {
|
|
34
|
+
// Now return the readonly lookup of the name.
|
|
35
|
+
const nameHub = E(nextAdmin).readonly();
|
|
36
|
+
return E(nameHub).lookup(nextName);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Wait until the next admin is resolved.
|
|
40
|
+
const restAdmin = await E(nextAdmin).lookupAdmin(nextName);
|
|
41
|
+
return nextPath(restAdmin, rest);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return Promise.all(
|
|
45
|
+
paths.map(async path => {
|
|
46
|
+
Array.isArray(path) || Fail`path ${path} is not an array`;
|
|
47
|
+
return nextPath(nameAdmin, path);
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Deposit payments (e.g. invitations) to an address's deposit facet, reserving
|
|
54
|
+
* the name path first so it resolves once the recipient provisions a wallet.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} debugName
|
|
57
|
+
* @param {ERef<NameAdmin>} namesByAddressAdmin
|
|
58
|
+
* @param {string} addr
|
|
59
|
+
* @param {ERef<Payment>[]} payments
|
|
60
|
+
*/
|
|
61
|
+
export const reserveThenDeposit = async (
|
|
62
|
+
debugName,
|
|
63
|
+
namesByAddressAdmin,
|
|
64
|
+
addr,
|
|
65
|
+
payments,
|
|
66
|
+
) => {
|
|
67
|
+
console.info('awaiting depositFacet for', debugName);
|
|
68
|
+
/** @type {any} */
|
|
69
|
+
const [depositFacet] = await reserveThenGetNamePaths(namesByAddressAdmin, [
|
|
70
|
+
[addr, WalletName.depositFacet],
|
|
71
|
+
]);
|
|
72
|
+
console.info('depositing to', debugName);
|
|
73
|
+
await Promise.allSettled(
|
|
74
|
+
payments.map(async (paymentP, i) => {
|
|
75
|
+
const payment = await paymentP;
|
|
76
|
+
await E(depositFacet).receive(payment);
|
|
77
|
+
console.info(
|
|
78
|
+
`confirmed deposit ${i + 1}/${payments.length} for`,
|
|
79
|
+
debugName,
|
|
80
|
+
);
|
|
81
|
+
}),
|
|
82
|
+
);
|
|
83
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function restartVats({ consume }: BootstrapPowers
|
|
1
|
+
export function restartVats({ consume }: BootstrapPowers, { options }: {
|
|
2
2
|
options: {
|
|
3
3
|
skip: string[];
|
|
4
4
|
};
|
|
@@ -11,36 +11,17 @@ export function getManifestForRestart(_powers: any, options: any): {
|
|
|
11
11
|
governedContractKits: boolean;
|
|
12
12
|
instancePrivateArgs: boolean;
|
|
13
13
|
loadCriticalVat: boolean;
|
|
14
|
-
psmKit: boolean;
|
|
15
14
|
vatStore: boolean;
|
|
16
15
|
vatAdminSvc: boolean;
|
|
17
16
|
vatUpgradeInfo: boolean;
|
|
18
17
|
zoe: string;
|
|
19
18
|
provisioning: string;
|
|
20
|
-
|
|
19
|
+
provisionPoolStartResult: boolean;
|
|
21
20
|
};
|
|
22
21
|
produce: {};
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
options: any;
|
|
26
25
|
};
|
|
27
|
-
/**
|
|
28
|
-
* The subset of EconomyBootstrapSpace (from
|
|
29
|
-
* inter-protocol/src/proposals/econ-behaviors.js) that this proposal reads,
|
|
30
|
-
* declared structurally so this package doesn't depend on inter-protocol.
|
|
31
|
-
*/
|
|
32
|
-
export type EconomyKitSpace = PromiseSpaceOf<{
|
|
33
|
-
psmKit: MapStore<Brand, {
|
|
34
|
-
label: string;
|
|
35
|
-
psm: Instance<any>;
|
|
36
|
-
psmAdminFacet: AdminFacet;
|
|
37
|
-
}>;
|
|
38
|
-
vaultFactoryKit: unknown;
|
|
39
|
-
}>;
|
|
40
26
|
import type { BootstrapPowers } from '../core/types.js';
|
|
41
|
-
import type { Brand } from '@agoric/ertp';
|
|
42
|
-
import type { Instance } from '@agoric/zoe/src/zoeService/utils.js';
|
|
43
|
-
import type { AdminFacet } from '@agoric/zoe';
|
|
44
|
-
import type { MapStore } from '@agoric/store';
|
|
45
|
-
import type { PromiseSpaceOf } from '../core/types.js';
|
|
46
27
|
//# sourceMappingURL=restart-vats-proposal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restart-vats-proposal.d.ts","sourceRoot":"","sources":["restart-vats-proposal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"restart-vats-proposal.d.ts","sourceRoot":"","sources":["restart-vats-proposal.js"],"names":[],"mappings":"AAyCO,yCAJI,eAAe,eAEvB;IAAmC,OAAO,EAAlC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;CAC5B,iBA4GA;AAGM;;QAEH,CAAC,WAAW,CAAC,IAAI,CAAC;;;;;;;;;;;;;;UAcjB;;;EAGH;qCA/JgD,kBAAkB"}
|
|
@@ -12,20 +12,6 @@ import { E, getInterfaceOf } from '@endo/far';
|
|
|
12
12
|
* @import {BootstrapPowers, PromiseSpaceOf} from '../core/types.js';
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* The subset of EconomyBootstrapSpace (from
|
|
17
|
-
* inter-protocol/src/proposals/econ-behaviors.js) that this proposal reads,
|
|
18
|
-
* declared structurally so this package doesn't depend on inter-protocol.
|
|
19
|
-
*
|
|
20
|
-
* @typedef {PromiseSpaceOf<{
|
|
21
|
-
* psmKit: MapStore<
|
|
22
|
-
* Brand,
|
|
23
|
-
* { label: string; psm: Instance<any>; psmAdminFacet: AdminFacet }
|
|
24
|
-
* >;
|
|
25
|
-
* vaultFactoryKit: unknown;
|
|
26
|
-
* }>} EconomyKitSpace
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
15
|
const trace = makeTracer('RV');
|
|
30
16
|
|
|
31
17
|
const HR = '----------------';
|
|
@@ -49,7 +35,7 @@ const vatUpgradeStatus = {
|
|
|
49
35
|
};
|
|
50
36
|
|
|
51
37
|
/**
|
|
52
|
-
* @param {BootstrapPowers
|
|
38
|
+
* @param {BootstrapPowers} space
|
|
53
39
|
* @param {object} config
|
|
54
40
|
* @param {{ skip: string[] }} config.options
|
|
55
41
|
*/
|
|
@@ -59,16 +45,15 @@ export const restartVats = async ({ consume }, { options }) => {
|
|
|
59
45
|
trace('restartVats start', options);
|
|
60
46
|
mustMatch(options, harden({ skip: M.arrayOf(M.string()) }));
|
|
61
47
|
|
|
62
|
-
trace('awaiting
|
|
63
|
-
await consume.
|
|
48
|
+
trace('awaiting provisionPoolStartResult as a proxy for "bootstrap done"');
|
|
49
|
+
await consume.provisionPoolStartResult;
|
|
64
50
|
|
|
65
51
|
trace('testing restarts');
|
|
66
|
-
const { contractKits, governedContractKits,
|
|
52
|
+
const { contractKits, governedContractKits, vatStore } =
|
|
67
53
|
await deeplyFulfilledObject(
|
|
68
54
|
harden({
|
|
69
55
|
contractKits: consume.contractKits,
|
|
70
56
|
governedContractKits: consume.governedContractKits,
|
|
71
|
-
psmKit: consume.psmKit,
|
|
72
57
|
vatStore: consume.vatStore,
|
|
73
58
|
}),
|
|
74
59
|
);
|
|
@@ -136,12 +121,6 @@ export const restartVats = async ({ consume }, { options }) => {
|
|
|
136
121
|
);
|
|
137
122
|
}
|
|
138
123
|
|
|
139
|
-
trace('iterating over psmKit');
|
|
140
|
-
for (const kit of psmKit.values()) {
|
|
141
|
-
console.log('restarting PSM', kit.label);
|
|
142
|
-
await tryRestartContract(kit.label, kit.psm, kit.psmAdminFacet);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
124
|
trace('iterating over vatStore');
|
|
146
125
|
for (const [name, { adminNode }] of vatStore.entries()) {
|
|
147
126
|
const status = vatUpgradeStatus[name];
|
|
@@ -178,13 +157,12 @@ export const getManifestForRestart = (_powers, options) => ({
|
|
|
178
157
|
governedContractKits: true,
|
|
179
158
|
instancePrivateArgs: true,
|
|
180
159
|
loadCriticalVat: true,
|
|
181
|
-
psmKit: true,
|
|
182
160
|
vatStore: true,
|
|
183
161
|
vatAdminSvc: true,
|
|
184
162
|
vatUpgradeInfo: true,
|
|
185
163
|
zoe: 'zoe',
|
|
186
164
|
provisioning: 'provisioning',
|
|
187
|
-
|
|
165
|
+
provisionPoolStartResult: true,
|
|
188
166
|
},
|
|
189
167
|
produce: {},
|
|
190
168
|
},
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export function startEconomicCommittee({ consume: { board, chainStorage, diagnostics, zoe }, produce: { economicCommitteeKit, economicCommitteeCreatorFacet }, installation: { consume: { committee }, }, instance: { produce: { economicCommittee }, }, }: BootstrapPowers & {
|
|
2
|
+
produce: {
|
|
3
|
+
economicCommitteeKit: Producer<StartedInstanceKit<typeof CommitteeStart> & {
|
|
4
|
+
label: string;
|
|
5
|
+
}>;
|
|
6
|
+
economicCommitteeCreatorFacet: Producer<CommitteeElectorateCreatorFacet>;
|
|
7
|
+
};
|
|
8
|
+
instance: {
|
|
9
|
+
produce: {
|
|
10
|
+
economicCommittee: Producer<Instance<typeof CommitteeStart>>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}, { options: { econCommitteeOptions } }: {
|
|
14
|
+
options?: {
|
|
15
|
+
econCommitteeOptions?: EconCommitteeOptions | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export const ECON_COMMITTEE_MANIFEST: {
|
|
19
|
+
[startEconomicCommittee.name]: {
|
|
20
|
+
consume: {
|
|
21
|
+
board: true;
|
|
22
|
+
chainStorage: true;
|
|
23
|
+
diagnostics: true;
|
|
24
|
+
zoe: true;
|
|
25
|
+
};
|
|
26
|
+
produce: {
|
|
27
|
+
economicCommitteeKit: true;
|
|
28
|
+
economicCommitteeCreatorFacet: string;
|
|
29
|
+
};
|
|
30
|
+
installation: {
|
|
31
|
+
consume: {
|
|
32
|
+
committee: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
instance: {
|
|
36
|
+
produce: {
|
|
37
|
+
economicCommittee: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export function getManifestForEconCommittee({ restoreRef }: {
|
|
43
|
+
restoreRef: any;
|
|
44
|
+
}, { installKeys, econCommitteeOptions }: {
|
|
45
|
+
installKeys: any;
|
|
46
|
+
econCommitteeOptions: any;
|
|
47
|
+
}): {
|
|
48
|
+
manifest: {
|
|
49
|
+
[startEconomicCommittee.name]: {
|
|
50
|
+
consume: {
|
|
51
|
+
board: true;
|
|
52
|
+
chainStorage: true;
|
|
53
|
+
diagnostics: true;
|
|
54
|
+
zoe: true;
|
|
55
|
+
};
|
|
56
|
+
produce: {
|
|
57
|
+
economicCommitteeKit: true;
|
|
58
|
+
economicCommitteeCreatorFacet: string;
|
|
59
|
+
};
|
|
60
|
+
installation: {
|
|
61
|
+
consume: {
|
|
62
|
+
committee: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
instance: {
|
|
66
|
+
produce: {
|
|
67
|
+
economicCommittee: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
installations: {
|
|
73
|
+
contractGovernor: any;
|
|
74
|
+
committee: any;
|
|
75
|
+
binaryVoteCounter: any;
|
|
76
|
+
};
|
|
77
|
+
options: {
|
|
78
|
+
econCommitteeOptions: any;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export type EconCommitteeOptions = {
|
|
82
|
+
committeeName?: string | undefined;
|
|
83
|
+
committeeSize?: number | undefined;
|
|
84
|
+
};
|
|
85
|
+
import type { BootstrapPowers } from '../core/types.js';
|
|
86
|
+
import type { start as CommitteeStart } from '@agoric/governance/src/committee.js';
|
|
87
|
+
import type { StartedInstanceKit } from '@agoric/zoe/src/zoeService/utils.js';
|
|
88
|
+
import type { Producer } from '../core/types.js';
|
|
89
|
+
import type { CommitteeElectorateCreatorFacet } from '@agoric/governance/src/committee.js';
|
|
90
|
+
import type { Instance } from '@agoric/zoe';
|
|
91
|
+
//# sourceMappingURL=start-econ-committee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-econ-committee.d.ts","sourceRoot":"","sources":["start-econ-committee.js"],"names":[],"mappings":"AAkDO,4PAfI,eAAe,GAAG;IACxB,OAAO,EAAE;QACP,oBAAoB,EAAE,SAC5B,mBAA2B,qBAAqB,CAAC,GAAG;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAC9D,CAAC;QACF,6BAA6B,EAAE,SAAS,+BAA+B,CAAC,CAAC;KAC1E,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE;YAAE,iBAAiB,EAAE,SAAS,SAAS,qBAAqB,CAAC,CAAC,CAAA;SAAE,CAAC;KAC3E,CAAC;CACH,yCAED;IAAwB,OAAO;;;CACoC,iBAyDrE;AAGD;IACE,CAAC,sBAAsB,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;MAiB5B;EACA;AAKI;;;;;;;QAvBL,CAAC,sBAAsB,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;UAiB5B;;;;;;;;;;EAqBF;;;;;qCAxI2C,kBAAkB;6CADa,qCAAqC;wCAD3E,qCAAqC;8BAE9B,kBAAkB;qDADa,qCAAqC;8BAFrF,aAAa"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { makeTracer } from '@agoric/internal';
|
|
2
|
+
import {
|
|
3
|
+
assertPathSegment,
|
|
4
|
+
makeStorageNodeChild,
|
|
5
|
+
} from '@agoric/internal/src/lib-chainStorage.js';
|
|
6
|
+
import { E } from '@endo/far';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @import {Instance} from '@agoric/zoe';
|
|
10
|
+
* @import {StartedInstanceKit} from '@agoric/zoe/src/zoeService/utils.js';
|
|
11
|
+
* @import {CommitteeElectorateCreatorFacet, start as CommitteeStart} from '@agoric/governance/src/committee.js';
|
|
12
|
+
* @import {BootstrapPowers, Producer} from '../core/types.js';
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const trace = makeTracer('RunEconCommittee', true);
|
|
16
|
+
|
|
17
|
+
/** @type {(name: string) => string} */
|
|
18
|
+
const sanitizePathSegment = name => {
|
|
19
|
+
const candidate = name.replace(/[ ,]/g, '_');
|
|
20
|
+
assertPathSegment(candidate);
|
|
21
|
+
return candidate;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {object} EconCommitteeOptions
|
|
26
|
+
* @property {string} [committeeName]
|
|
27
|
+
* @property {number} [committeeSize]
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Start the Economic Committee electorate. Formerly part of
|
|
32
|
+
* `inter-protocol`; relocated to `@agoric/vats` because it outlives
|
|
33
|
+
* Inter Protocol — provisionPool (in this package) is governed and needs this
|
|
34
|
+
* electorate. The committee contract itself remains in `@agoric/governance`.
|
|
35
|
+
*
|
|
36
|
+
* @param {BootstrapPowers & {
|
|
37
|
+
* produce: {
|
|
38
|
+
* economicCommitteeKit: Producer<
|
|
39
|
+
* StartedInstanceKit<typeof CommitteeStart> & { label: string }
|
|
40
|
+
* >;
|
|
41
|
+
* economicCommitteeCreatorFacet: Producer<CommitteeElectorateCreatorFacet>;
|
|
42
|
+
* };
|
|
43
|
+
* instance: {
|
|
44
|
+
* produce: { economicCommittee: Producer<Instance<typeof CommitteeStart>> };
|
|
45
|
+
* };
|
|
46
|
+
* }} powers
|
|
47
|
+
* @param {object} config
|
|
48
|
+
* @param {object} [config.options]
|
|
49
|
+
* @param {EconCommitteeOptions} [config.options.econCommitteeOptions]
|
|
50
|
+
*/
|
|
51
|
+
export const startEconomicCommittee = async (
|
|
52
|
+
{
|
|
53
|
+
consume: { board, chainStorage, diagnostics, zoe },
|
|
54
|
+
produce: { economicCommitteeKit, economicCommitteeCreatorFacet },
|
|
55
|
+
installation: {
|
|
56
|
+
consume: { committee },
|
|
57
|
+
},
|
|
58
|
+
instance: {
|
|
59
|
+
produce: { economicCommittee },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{ options: { econCommitteeOptions = {} } = {} },
|
|
63
|
+
) => {
|
|
64
|
+
const COMMITTEES_ROOT = 'committees';
|
|
65
|
+
trace('startEconomicCommittee');
|
|
66
|
+
const {
|
|
67
|
+
// NB: the electorate (and size) of the committee may change, but the name must not
|
|
68
|
+
committeeName = 'Economic Committee',
|
|
69
|
+
committeeSize = 3,
|
|
70
|
+
...rest
|
|
71
|
+
} = econCommitteeOptions;
|
|
72
|
+
|
|
73
|
+
const committeesNode = await makeStorageNodeChild(
|
|
74
|
+
chainStorage,
|
|
75
|
+
COMMITTEES_ROOT,
|
|
76
|
+
);
|
|
77
|
+
const storageNode = await E(committeesNode).makeChildNode(
|
|
78
|
+
sanitizePathSegment(committeeName),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
// NB: committee must only publish what it intended to be public
|
|
82
|
+
const marshaller = await E(board).getPublishingMarshaller();
|
|
83
|
+
|
|
84
|
+
const privateArgs = {
|
|
85
|
+
storageNode,
|
|
86
|
+
marshaller,
|
|
87
|
+
};
|
|
88
|
+
const startResult = await E(zoe).startInstance(
|
|
89
|
+
committee,
|
|
90
|
+
{},
|
|
91
|
+
{ committeeName, committeeSize, ...rest },
|
|
92
|
+
privateArgs,
|
|
93
|
+
'economicCommittee',
|
|
94
|
+
);
|
|
95
|
+
const { creatorFacet, instance } = startResult;
|
|
96
|
+
|
|
97
|
+
economicCommitteeKit.resolve(
|
|
98
|
+
// XXX should startInstance return its label?
|
|
99
|
+
harden({ ...startResult, label: 'economicCommittee' }),
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
await E(diagnostics).savePrivateArgs(startResult.instance, privateArgs);
|
|
103
|
+
|
|
104
|
+
economicCommitteeCreatorFacet.resolve(creatorFacet);
|
|
105
|
+
economicCommittee.resolve(instance);
|
|
106
|
+
};
|
|
107
|
+
harden(startEconomicCommittee);
|
|
108
|
+
|
|
109
|
+
export const ECON_COMMITTEE_MANIFEST = harden({
|
|
110
|
+
[startEconomicCommittee.name]: {
|
|
111
|
+
consume: {
|
|
112
|
+
board: true,
|
|
113
|
+
chainStorage: true,
|
|
114
|
+
diagnostics: true,
|
|
115
|
+
zoe: true,
|
|
116
|
+
},
|
|
117
|
+
produce: {
|
|
118
|
+
economicCommitteeKit: true,
|
|
119
|
+
economicCommitteeCreatorFacet: 'economicCommittee',
|
|
120
|
+
},
|
|
121
|
+
installation: {
|
|
122
|
+
consume: { committee: 'zoe' },
|
|
123
|
+
},
|
|
124
|
+
instance: {
|
|
125
|
+
produce: { economicCommittee: 'economicCommittee' },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Core-eval manifest for the Economic Committee. Also publishes the governance
|
|
131
|
+
// installations (contractGovernor, committee, binaryVoteCounter) that governed
|
|
132
|
+
// contracts such as provisionPool depend on.
|
|
133
|
+
export const getManifestForEconCommittee = (
|
|
134
|
+
{ restoreRef },
|
|
135
|
+
{ installKeys, econCommitteeOptions },
|
|
136
|
+
) => {
|
|
137
|
+
return {
|
|
138
|
+
manifest: ECON_COMMITTEE_MANIFEST,
|
|
139
|
+
installations: {
|
|
140
|
+
contractGovernor: restoreRef(installKeys.contractGovernor),
|
|
141
|
+
committee: restoreRef(installKeys.committee),
|
|
142
|
+
binaryVoteCounter: restoreRef(installKeys.binaryVoteCounter),
|
|
143
|
+
},
|
|
144
|
+
options: {
|
|
145
|
+
econCommitteeOptions,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
};
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
export function prepareBridgeProvisionTool(zone: Zone): (bankManager: ERef<import("@endo/exo").Guarded<{
|
|
2
2
|
getAssetSubscription(): import("@agoric/notifier").IterableEachTopic<AssetDescriptor>;
|
|
3
|
-
getRewardDistributorDepositFacet(denom: string, feeKit: AssetIssuerKit):
|
|
3
|
+
getRewardDistributorDepositFacet(denom: string, feeKit: AssetIssuerKit): Promise<import("@endo/far").EOnly<import("@agoric/ertp").DepositFacet>>;
|
|
4
4
|
getModuleAccountAddress(moduleName: string): Promise<string | null>;
|
|
5
5
|
addAsset(denom: string, issuerName: string, proposedName: string, kit: AssetIssuerKit & {
|
|
6
6
|
payment?: ERef<Payment<"nat">>;
|
|
7
7
|
}): Promise<void>;
|
|
8
8
|
getBankForAddress(address: string): Promise<Bank>;
|
|
9
|
-
}
|
|
9
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
10
|
+
addAsset: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"splitRecord", [{
|
|
11
|
+
issuer: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
12
|
+
brand: import("@endo/patterns").CastedPattern<Brand>;
|
|
13
|
+
}, {
|
|
14
|
+
mint: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
15
|
+
payment: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
16
|
+
}, never]>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
17
|
+
getAssetSubscription: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
18
|
+
getBankForAddress: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
19
|
+
getModuleAccountAddress: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [null, import("@endo/patterns").MatcherOf<"string", string>]>, import("@endo/patterns").SyncValueGuard>;
|
|
20
|
+
getRewardDistributorDepositFacet: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"splitRecord", [{
|
|
21
|
+
issuer: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
22
|
+
brand: import("@endo/patterns").CastedPattern<Brand>;
|
|
23
|
+
}, {
|
|
24
|
+
mint: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
25
|
+
}, never]>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
26
|
+
}>>>, walletFactory: ERef<import("@endo/exo").Guarded<{
|
|
10
27
|
provideSmartWallet(address: string, bank: ERef<Bank>, namesByAddressAdmin: ERef<NameAdmin>): Promise<[wallet: import("@agoric/smart-wallet/src/smartWallet.js").SmartWallet, isNew: boolean]>;
|
|
11
28
|
}>>, namesByAddressAdmin: ERef<NameAdmin>, forHandler: any) => import("@endo/exo").Guarded<{
|
|
12
29
|
/** @param {BridgeMessage} obj */
|
|
13
30
|
fromBridge(obj: BridgeMessage): Promise<void>;
|
|
14
|
-
}
|
|
31
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
32
|
+
fromBridge: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"recordOf", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
33
|
+
}>>;
|
|
15
34
|
export function prepareProvisionPoolKit(zone: Zone, { makeRecorderKit, params, poolBank, zcf, makeBridgeProvisionTool }: {
|
|
16
35
|
makeRecorderKit: MakeRecorderKit;
|
|
17
36
|
params: any;
|
|
@@ -60,14 +79,14 @@ export type MetricsNotification = {
|
|
|
60
79
|
};
|
|
61
80
|
import type { Zone } from '@agoric/zone';
|
|
62
81
|
import type { AssetDescriptor } from '@agoric/vats/src/vat-bank.js';
|
|
63
|
-
import type { ERef } from '@endo/far';
|
|
64
82
|
import type { Payment } from '@agoric/ertp';
|
|
83
|
+
import type { ERef } from '@endo/far';
|
|
65
84
|
import type { Bank } from '@agoric/vats/src/vat-bank.js';
|
|
85
|
+
import type { Brand } from '@agoric/ertp';
|
|
66
86
|
import type { NameAdmin } from '@agoric/vats';
|
|
67
87
|
import type { BridgeMessage } from '@agoric/cosmic-swingset/src/types.js';
|
|
68
88
|
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
69
89
|
import type { ZCF } from '@agoric/zoe';
|
|
70
|
-
import type { Brand } from '@agoric/ertp';
|
|
71
90
|
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
72
91
|
import type { ERemote } from '@agoric/internal';
|
|
73
92
|
import type { BridgeHandler } from '@agoric/vats';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisionPoolKit.d.ts","sourceRoot":"","sources":["provisionPoolKit.js"],"names":[],"mappings":"AAqFO,iDAFI,IAAI;;;;;
|
|
1
|
+
{"version":3,"file":"provisionPoolKit.d.ts","sourceRoot":"","sources":["provisionPoolKit.js"],"names":[],"mappings":"AAqFO,iDAFI,IAAI;;;;;eA4ci4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;IAvb34G,iCAAiC;oBAArB,aAAa;;;IA6B5B;AAYI,8CATI,IAAI,uEACJ;IACN,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,KAAK,IAAI,CAAC,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT,uBAAuB,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;CACxE,gCA8XC;IAA2B,SAAS,EAA5B,MAAM,KAAK,CAAC;IACe,WAAW,EAAtC,QAAQ,WAAW,CAAC;CAC5B,KAAU,OAAO,CAAC,gBAAgB,CAAC,CAevC;+BA7eY;IACR,OAAO,EAAE;QACP,qBAAqB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;QACxD,gBAAgB,EAAE,MAAM,KAAK,GAAG,CAAC,CAAC;QAClC,aAAa,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACpE,WAAW,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC;KACxC,CAAC;IACF,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;CACb;;iBAKU,KAAK,WAAW,CAAC;yBACjB,KAAK,SAAS,CAAC;mBACf,KAAK,wBAAwB,CAAC,cAAc,CAAC,CAAC;;;;;;;;;;wBAM9C,MAAM;;;;;yBACN,OAAO,KAAK,CAAC;;;;;0BAEb,OAAO,KAAK,CAAC;;0BA1CJ,cAAc;qCAKH,8BAA8B;6BAdhB,cAAc;0BAIvC,WAAW;0BACE,8BAA8B;2BALlB,cAAc;+BAOlC,cAAc;mCARV,sCAAsC;qCAYpC,6CAA6C;yBARzD,aAAa;iCADL,0CAA0C;6BADtC,kBAAkB;mCAYpB,cAAc;iCARV,8BAA8B;8CAGvB,6CAA6C;4BARxC,cAAc"}
|
package/src/transfer.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ export function prepareTransferTools(zone: Zone, vowTools: VowTools): {
|
|
|
10
10
|
wrapApp: (tap: ERef<TargetApp>, targetHost: ERef<TargetHost>, isActiveTap?: boolean | undefined) => import("@endo/exo").Guarded<{
|
|
11
11
|
/** @param {VTransferIBCEvent} obj */
|
|
12
12
|
receiveUpcall(obj: VTransferIBCEvent): Promise<Vow<unknown> | undefined>;
|
|
13
|
-
}
|
|
13
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
14
|
+
receiveUpcall: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").SyncValueGuard>;
|
|
15
|
+
}>>;
|
|
14
16
|
};
|
|
15
17
|
transferMiddleware: {
|
|
16
18
|
registerTap(target: string, tap: ERef<TargetApp>): any;
|
|
@@ -23,6 +25,18 @@ export function prepareTransferTools(zone: Zone, vowTools: VowTools): {
|
|
|
23
25
|
*/
|
|
24
26
|
unregisterTap(target: string): Promise<void>;
|
|
25
27
|
};
|
|
28
|
+
}, {
|
|
29
|
+
finisher: import("@endo/patterns").InterfaceGuard<{
|
|
30
|
+
useRegistry: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
31
|
+
}>;
|
|
32
|
+
interceptorFactory: import("@endo/patterns").InterfaceGuard<{
|
|
33
|
+
wrapApp: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").AwaitArgGuard<import("@endo/patterns").MatcherOf<"remotable", any>>, import("@endo/patterns").AwaitArgGuard<import("@endo/patterns").MatcherOf<"remotable", any>>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
34
|
+
}>;
|
|
35
|
+
transferMiddleware: import("@endo/patterns").InterfaceGuard<{
|
|
36
|
+
registerTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
37
|
+
registerActiveTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
38
|
+
unregisterTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
39
|
+
}>;
|
|
26
40
|
}>;
|
|
27
41
|
};
|
|
28
42
|
export type RegisterTap = (target: string, tap: ERef<TargetApp>) => any;
|
|
@@ -68,7 +82,9 @@ declare function prepareTransferMiddlewareKit(zone: Zone, makeTransferIntercepto
|
|
|
68
82
|
wrapApp: (tap: ERef<TargetApp>, targetHost: ERef<TargetHost>, isActiveTap?: boolean | undefined) => import("@endo/exo").Guarded<{
|
|
69
83
|
/** @param {VTransferIBCEvent} obj */
|
|
70
84
|
receiveUpcall(obj: VTransferIBCEvent): Promise<Vow<unknown> | undefined>;
|
|
71
|
-
}
|
|
85
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
86
|
+
receiveUpcall: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").SyncValueGuard>;
|
|
87
|
+
}>>;
|
|
72
88
|
};
|
|
73
89
|
transferMiddleware: {
|
|
74
90
|
registerTap(target: string, tap: ERef<TargetApp>): any;
|
|
@@ -81,6 +97,18 @@ declare function prepareTransferMiddlewareKit(zone: Zone, makeTransferIntercepto
|
|
|
81
97
|
*/
|
|
82
98
|
unregisterTap(target: string): Promise<void>;
|
|
83
99
|
};
|
|
100
|
+
}, {
|
|
101
|
+
finisher: import("@endo/patterns").InterfaceGuard<{
|
|
102
|
+
useRegistry: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
103
|
+
}>;
|
|
104
|
+
interceptorFactory: import("@endo/patterns").InterfaceGuard<{
|
|
105
|
+
wrapApp: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").AwaitArgGuard<import("@endo/patterns").MatcherOf<"remotable", any>>, import("@endo/patterns").AwaitArgGuard<import("@endo/patterns").MatcherOf<"remotable", any>>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
106
|
+
}>;
|
|
107
|
+
transferMiddleware: import("@endo/patterns").InterfaceGuard<{
|
|
108
|
+
registerTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
109
|
+
registerActiveTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").SyncValueGuard>;
|
|
110
|
+
unregisterTap: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
111
|
+
}>;
|
|
84
112
|
}>;
|
|
85
113
|
/**
|
|
86
114
|
* @param {Zone} zone
|
|
@@ -89,6 +117,8 @@ declare function prepareTransferMiddlewareKit(zone: Zone, makeTransferIntercepto
|
|
|
89
117
|
declare function prepareTransferInterceptor(zone: Zone, vowTools: VowTools): (tap: ERef<TargetApp>, targetHost: ERef<TargetHost>, isActiveTap?: boolean | undefined) => import("@endo/exo").Guarded<{
|
|
90
118
|
/** @param {VTransferIBCEvent} obj */
|
|
91
119
|
receiveUpcall(obj: VTransferIBCEvent): Promise<Vow<unknown> | undefined>;
|
|
92
|
-
}
|
|
120
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
121
|
+
receiveUpcall: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").SyncValueGuard>;
|
|
122
|
+
}>>;
|
|
93
123
|
export {};
|
|
94
124
|
//# sourceMappingURL=transfer.d.ts.map
|
package/src/transfer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["transfer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["transfer.js"],"names":[],"mappings":"AAuQO,2CAHI,IAAI,YACJ,QAAQ;;;YArDX;;eAEG;kCADQ,cAAc;;;;gBAxJzB,qCAAqC;mCAAzB,iBAAiB;;;;;;gCAqH1B,MAAM,OACN,KAAK,SAAS,CAAC;sCADf,MAAM,OACN,KAAK,SAAS,CAAC;YAmElB;;;;;eAKG;kCAFQ,MAAM;;;;;;;;;;;;;;;EAyBxB;mCAhGU,MAAM,OACN,KAAK,SAAS,CAAC;oCAiFZ,UAAU,CAAC,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;iCAC3D,qBAAqB,CAAC,oBAAoB,CAAC;0BArPlC,mBAAmB;8BACf,aAAa;oCAEP,oBAAoB;+BALb,oBAAoB;0BADrC,WAAW;gCACM,oBAAoB;uCACxB,YAAY;yBAG1B,aAAa;AA8JnC;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACH,oDAHW,IAAI,2BACJ,UAAU,CAAC,OAAO,0BAA0B,CAAC;;QAgBhD;;WAEG;8BADQ,cAAc;;;;YAxJzB,qCAAqC;+BAAzB,iBAAiB;;;;;;4BAqH1B,MAAM,OACN,KAAK,SAAS,CAAC;kCADf,MAAM,OACN,KAAK,SAAS,CAAC;QAmElB;;;;;WAKG;8BAFQ,MAAM;;;;;;;;;;;;;;GAUtB;AAvOH;;;GAGG;AACH,kDAHW,IAAI,YACJ,QAAQ;IA+BX,qCAAqC;uBAAzB,iBAAiB;;;IA6FpC"}
|
package/src/transfer.js
CHANGED
|
@@ -115,6 +115,7 @@ const prepareTransferInterceptor = (zone, vowTools) => {
|
|
|
115
115
|
* A watcher for sending error acknowledgements down to the host.
|
|
116
116
|
*/
|
|
117
117
|
nackSender: {
|
|
118
|
+
/** @param {Error} error @param {{ response: any }} _ctx */
|
|
118
119
|
onRejected(error, { response }) {
|
|
119
120
|
console.error(`Error sending ack:`, error);
|
|
120
121
|
const rawAck = JSON.stringify({ error: error.message });
|
package/src/types.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type { BridgeId, Remote } from '@agoric/internal';
|
|
|
5
5
|
import type { Bytes } from '@agoric/network';
|
|
6
6
|
import type { IBCChannelID, IBCChannelOrdering, IBCConnectionID, IBCPortID } from '@agoric/network/ibc';
|
|
7
7
|
import type { Guarded } from '@endo/exo';
|
|
8
|
-
import type { CaipChainId } from '@agoric/orchestration';
|
|
9
8
|
import type { Installation, Instance } from '@agoric/zoe/src/zoeService/types.js';
|
|
10
9
|
import type { AssetInfo } from './vat-bank.js';
|
|
10
|
+
type CaipChainId = `${string}:${string}`;
|
|
11
11
|
export type { IBCChannelID, IBCChannelOrdering, IBCConnectionID, IBCPortID, } from '@agoric/network/ibc';
|
|
12
12
|
/**
|
|
13
13
|
* Published vstorage values under the `agoricNames.` hierarchy.
|