@agoric/vats 0.15.2-dev-857e650.0 → 0.15.2-dev-284e2db.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/package.json +20 -20
- package/src/bridge.d.ts.map +1 -1
- package/src/bridge.js +23 -11
- package/src/centralSupply.d.ts.map +1 -1
- package/src/centralSupply.js +3 -3
- package/src/core/basic-behaviors.d.ts.map +1 -1
- package/src/core/basic-behaviors.js +55 -49
- package/src/core/boot-chain.js +3 -3
- package/src/core/boot-sim.js +3 -3
- package/src/core/boot-solo.js +4 -4
- package/src/core/chain-behaviors.d.ts.map +1 -1
- package/src/core/chain-behaviors.js +28 -23
- package/src/core/client-behaviors.d.ts.map +1 -1
- package/src/core/client-behaviors.js +5 -4
- package/src/core/demoIssuers.d.ts +17 -15
- package/src/core/demoIssuers.d.ts.map +1 -1
- package/src/core/demoIssuers.js +34 -34
- package/src/core/lib-boot.d.ts +9 -8
- package/src/core/lib-boot.d.ts.map +1 -1
- package/src/core/lib-boot.js +26 -15
- package/src/core/promise-space.d.ts.map +1 -1
- package/src/core/promise-space.js +14 -14
- package/src/core/startWalletFactory.d.ts +4 -1
- package/src/core/startWalletFactory.d.ts.map +1 -1
- package/src/core/startWalletFactory.js +25 -16
- package/src/core/types.d.ts +19 -278
- package/src/core/types.d.ts.map +1 -1
- package/src/core/types.js +385 -210
- package/src/core/utils.d.ts +4 -2
- package/src/core/utils.d.ts.map +1 -1
- package/src/core/utils.js +30 -28
- package/src/crc.d.ts +2 -6
- package/src/crc.d.ts.map +1 -1
- package/src/crc.js +5 -15
- package/src/ibc.d.ts +5 -5
- package/src/ibc.d.ts.map +1 -1
- package/src/ibc.js +22 -40
- package/src/lib-board.d.ts +48 -49
- package/src/lib-board.d.ts.map +1 -1
- package/src/lib-board.js +32 -39
- package/src/mintHolder.d.ts.map +1 -1
- package/src/mintHolder.js +5 -6
- package/src/nameHub.d.ts.map +1 -1
- package/src/nameHub.js +17 -7
- package/src/proposals/network-proposal.d.ts.map +1 -1
- package/src/proposals/network-proposal.js +13 -10
- package/src/proposals/restart-vats-proposal.d.ts +1 -1
- package/src/proposals/restart-vats-proposal.d.ts.map +1 -1
- package/src/proposals/restart-vats-proposal.js +3 -3
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +9 -10
- package/src/provisionPoolKit.d.ts +14 -27
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +26 -29
- package/src/repl.js +1 -1
- package/src/types.d.ts +28 -27
- package/src/types.d.ts.map +1 -1
- package/src/types.js +49 -46
- package/src/vat-bank.d.ts +49 -48
- package/src/vat-bank.d.ts.map +1 -1
- package/src/vat-bank.js +55 -50
- package/src/vat-mints.d.ts +10 -10
- package/src/vat-mints.d.ts.map +1 -1
- package/src/vat-mints.js +6 -6
- package/src/vat-provisioning.d.ts.map +1 -1
- package/src/vat-provisioning.js +11 -6
- package/src/virtual-purse.d.ts +6 -6
- package/src/virtual-purse.d.ts.map +1 -1
- package/src/virtual-purse.js +34 -33
- package/src/walletFlags.js +1 -2
- package/tools/authorityViz.d.ts.map +1 -1
- package/tools/authorityViz.js +34 -25
- package/tools/bank-utils.d.ts +1 -1
- package/tools/bank-utils.d.ts.map +1 -1
- package/tools/bank-utils.js +12 -5
- package/tools/board-utils.d.ts +1 -1
- package/tools/board-utils.d.ts.map +1 -1
- package/tools/board-utils.js +22 -14
- package/tools/boot-test-utils.d.ts.map +1 -1
- package/tools/boot-test-utils.js +7 -9
package/tools/bank-utils.js
CHANGED
|
@@ -4,13 +4,16 @@ import { makeScalarMapStore } from '@agoric/vat-data';
|
|
|
4
4
|
import { E } from '@endo/far';
|
|
5
5
|
import { Far } from '@endo/marshal';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @param {Array<Pick<IssuerKit, 'brand' | 'issuer'>>} issuerKits
|
|
9
|
-
*/
|
|
7
|
+
/** @param {Pick<IssuerKit, 'brand' | 'issuer'>[]} issuerKits */
|
|
10
8
|
export const makeFakeBankKit = issuerKits => {
|
|
11
9
|
/** @type {MapStore<Brand, ERef<Issuer>>} */
|
|
12
10
|
const issuers = makeScalarMapStore();
|
|
13
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* @type {MapStore<
|
|
13
|
+
* Brand,
|
|
14
|
+
* ERef<import('../src/vat-bank.js').VirtualPurse>
|
|
15
|
+
* >}
|
|
16
|
+
*/
|
|
14
17
|
const purses = makeScalarMapStore();
|
|
15
18
|
|
|
16
19
|
// XXX setup purses without publishing
|
|
@@ -20,7 +23,11 @@ export const makeFakeBankKit = issuerKits => {
|
|
|
20
23
|
purses.init(kit.brand, E(kit.issuer).makeEmptyPurse());
|
|
21
24
|
});
|
|
22
25
|
|
|
23
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @type {SubscriptionRecord<
|
|
28
|
+
* import('../src/vat-bank.js').AssetDescriptor
|
|
29
|
+
* >}
|
|
30
|
+
*/
|
|
24
31
|
const { subscription, publication } = makeSubscriptionKit();
|
|
25
32
|
|
|
26
33
|
/**
|
package/tools/board-utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@agoric/internal/src/marshal.js";
|
|
2
|
-
export function makeAgoricNamesRemotesFromFakeStorage(fakeStorageKit: import(
|
|
2
|
+
export function makeAgoricNamesRemotesFromFakeStorage(fakeStorageKit: import('@agoric/internal/src/storage-test-utils.js').FakeStorageKit): AgoricNamesRemotes;
|
|
3
3
|
export function makeFakeBoard(initSequence?: number | bigint | undefined, options?: {
|
|
4
4
|
prefix?: string | undefined;
|
|
5
5
|
crcDigits?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["board-utils.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["board-utils.js"],"names":[],"mappings":";AAqCO,sEAHI,OAAO,4CAA4C,EAAE,cAAc,GACjE,kBAAkB,CAwC9B;AAYM;;;;;;;;;;;;;;;;;;;;;EAGN;+BAxFY;IACZ,KAAS,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC;IACjE,KAAS,EAAE,MAAM,CAAC;IAClB,WAAe,EAAE,WAAW,CAAC;IAC7B,MAAU,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC;IAClE,UAAc,EAAE,MAAM,CAAC;IACvB,YAAgB,EAAE,MAAM,CAAC;CACtB;iCAGS;IACZ,KAAS,EAAE,OACX,MAAY,EACZ,OAAa,iCAAiC,EAAE,WAAW,CACtD,CAAC;IACN,QAAY,EAAE,OAAO,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvC,UAAc,EAAE,OAAO,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjD,OAAW,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
|
package/tools/board-utils.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {{
|
|
4
|
-
* brand: import('@agoric/internal/src/marshal.js').BoardRemote
|
|
5
|
-
* denom: string
|
|
6
|
-
* displayInfo: DisplayInfo
|
|
7
|
-
* issuer: import('@agoric/internal/src/marshal.js').BoardRemote
|
|
8
|
-
* issuerName: string
|
|
9
|
-
* proposedName: string
|
|
4
|
+
* brand: import('@agoric/internal/src/marshal.js').BoardRemote;
|
|
5
|
+
* denom: string;
|
|
6
|
+
* displayInfo: DisplayInfo;
|
|
7
|
+
* issuer: import('@agoric/internal/src/marshal.js').BoardRemote;
|
|
8
|
+
* issuerName: string;
|
|
9
|
+
* proposedName: string;
|
|
10
10
|
* }} VBankAssetDetail
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {{
|
|
14
|
-
* brand: Record<
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* brand: Record<
|
|
15
|
+
* string,
|
|
16
|
+
* import('@agoric/internal/src/marshal.js').BoardRemote
|
|
17
|
+
* >;
|
|
18
|
+
* instance: Record<string, Instance>;
|
|
19
|
+
* vbankAsset: Record<string, VBankAssetDetail>;
|
|
20
|
+
* reverse: Record<string, string>;
|
|
18
21
|
* }} AgoricNamesRemotes
|
|
19
22
|
*/
|
|
20
23
|
|
|
@@ -29,7 +32,7 @@ import { prepareBoardKit } from '../src/lib-board.js';
|
|
|
29
32
|
export * from '@agoric/internal/src/marshal.js';
|
|
30
33
|
|
|
31
34
|
/**
|
|
32
|
-
* @param {import(
|
|
35
|
+
* @param {import('@agoric/internal/src/storage-test-utils.js').FakeStorageKit} fakeStorageKit
|
|
33
36
|
* @returns {AgoricNamesRemotes}
|
|
34
37
|
*/
|
|
35
38
|
export const makeAgoricNamesRemotesFromFakeStorage = fakeStorageKit => {
|
|
@@ -41,7 +44,12 @@ export const makeAgoricNamesRemotesFromFakeStorage = fakeStorageKit => {
|
|
|
41
44
|
const { fromCapData } = makeMarshal(undefined, slotToBoardRemote);
|
|
42
45
|
const reverse = {};
|
|
43
46
|
const entries = ['brand', 'instance'].map(kind => {
|
|
44
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @type {[
|
|
49
|
+
* string,
|
|
50
|
+
* import('@agoric/vats/tools/board-utils.js').BoardRemote,
|
|
51
|
+
* ][]}
|
|
52
|
+
*/
|
|
45
53
|
const parts = unmarshalFromVstorage(
|
|
46
54
|
data,
|
|
47
55
|
`published.agoricNames.${kind}`,
|
|
@@ -69,8 +77,8 @@ export const makeAgoricNamesRemotesFromFakeStorage = fakeStorageKit => {
|
|
|
69
77
|
harden(makeAgoricNamesRemotesFromFakeStorage);
|
|
70
78
|
|
|
71
79
|
/**
|
|
72
|
-
* Make a board that uses durable storage, but with fake baggage which will fail
|
|
73
|
-
* Suitable only for use in tests.
|
|
80
|
+
* Make a board that uses durable storage, but with fake baggage which will fail
|
|
81
|
+
* upgrade. Suitable only for use in tests.
|
|
74
82
|
*
|
|
75
83
|
* @param {bigint | number} [initSequence]
|
|
76
84
|
* @param {object} [options]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-test-utils.d.ts","sourceRoot":"","sources":["boot-test-utils.js"],"names":[],"mappings":";;;;;;;;;;;AAkCO,6BAAqB;AAE5B,qBAAqB;AAErB,yBAFW,MAAM,CAEgB;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCH;AAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEN;AAEM,iDAON;
|
|
1
|
+
{"version":3,"file":"boot-test-utils.d.ts","sourceRoot":"","sources":["boot-test-utils.js"],"names":[],"mappings":";;;;;;;;;;;AAkCO,6BAAqB;AAE5B,qBAAqB;AAErB,yBAFW,MAAM,CAEgB;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCH;AAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEN;AAEM,iDAON;AAGM,gDADW,MAAM,KAAK,IAAI,SAKhC;mDAzJkD,2BAA2B;4CAClC,oBAAoB;6CACnB,qBAAqB;2CACvB,mBAAmB;6CACjB,qBAAqB;+CACnB,uBAAuB;sDAChB,8BAA8B;oDAChC,4BAA4B;2CACrC,mBAAmB"}
|
package/tools/boot-test-utils.js
CHANGED
|
@@ -41,16 +41,16 @@ export const mockDProxy = d => d;
|
|
|
41
41
|
export const makeMock = log =>
|
|
42
42
|
harden({
|
|
43
43
|
devices: {
|
|
44
|
-
command: /** @type {
|
|
45
|
-
mailbox: /** @type {
|
|
44
|
+
command: /** @type {any} */ ({ registerInboundHandler: noop }),
|
|
45
|
+
mailbox: /** @type {any} */ ({
|
|
46
46
|
registerInboundHandler: noop,
|
|
47
47
|
}),
|
|
48
|
-
timer: /** @type {
|
|
49
|
-
plugin: /** @type {
|
|
48
|
+
timer: /** @type {any} */ ({}),
|
|
49
|
+
plugin: /** @type {any} */ ({ registerReceiver: noop }),
|
|
50
50
|
...devices,
|
|
51
51
|
},
|
|
52
52
|
vats: {
|
|
53
|
-
vattp: /** @type {
|
|
53
|
+
vattp: /** @type {any} */ (
|
|
54
54
|
Far('vattp', {
|
|
55
55
|
registerMailboxDevice: noop,
|
|
56
56
|
addRemote: () => harden({}),
|
|
@@ -142,7 +142,7 @@ export const makePopulatedFakeVatAdmin = () => {
|
|
|
142
142
|
const criticalVatKey = vatAdminState.getCriticalVatKey();
|
|
143
143
|
const getCriticalVatKey = () => criticalVatKey;
|
|
144
144
|
const createVatAdminService = () => vatAdminService;
|
|
145
|
-
/** @type {
|
|
145
|
+
/** @type {any} */
|
|
146
146
|
const vatAdminRoot = { getCriticalVatKey, createVatAdminService };
|
|
147
147
|
return { vatAdminService, vatAdminRoot };
|
|
148
148
|
};
|
|
@@ -156,9 +156,7 @@ export const mockSwingsetVats = mock => {
|
|
|
156
156
|
return vats;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
/**
|
|
160
|
-
* @param {(msg: string) => void} log
|
|
161
|
-
*/
|
|
159
|
+
/** @param {(msg: string) => void} log */
|
|
162
160
|
export const mockPsmBootstrapArgs = log => {
|
|
163
161
|
const mock = makeMock(log);
|
|
164
162
|
const vats = mockSwingsetVats(mock);
|