@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.
Files changed (80) hide show
  1. package/package.json +20 -20
  2. package/src/bridge.d.ts.map +1 -1
  3. package/src/bridge.js +23 -11
  4. package/src/centralSupply.d.ts.map +1 -1
  5. package/src/centralSupply.js +3 -3
  6. package/src/core/basic-behaviors.d.ts.map +1 -1
  7. package/src/core/basic-behaviors.js +55 -49
  8. package/src/core/boot-chain.js +3 -3
  9. package/src/core/boot-sim.js +3 -3
  10. package/src/core/boot-solo.js +4 -4
  11. package/src/core/chain-behaviors.d.ts.map +1 -1
  12. package/src/core/chain-behaviors.js +28 -23
  13. package/src/core/client-behaviors.d.ts.map +1 -1
  14. package/src/core/client-behaviors.js +5 -4
  15. package/src/core/demoIssuers.d.ts +17 -15
  16. package/src/core/demoIssuers.d.ts.map +1 -1
  17. package/src/core/demoIssuers.js +34 -34
  18. package/src/core/lib-boot.d.ts +9 -8
  19. package/src/core/lib-boot.d.ts.map +1 -1
  20. package/src/core/lib-boot.js +26 -15
  21. package/src/core/promise-space.d.ts.map +1 -1
  22. package/src/core/promise-space.js +14 -14
  23. package/src/core/startWalletFactory.d.ts +4 -1
  24. package/src/core/startWalletFactory.d.ts.map +1 -1
  25. package/src/core/startWalletFactory.js +25 -16
  26. package/src/core/types.d.ts +19 -278
  27. package/src/core/types.d.ts.map +1 -1
  28. package/src/core/types.js +385 -210
  29. package/src/core/utils.d.ts +4 -2
  30. package/src/core/utils.d.ts.map +1 -1
  31. package/src/core/utils.js +30 -28
  32. package/src/crc.d.ts +2 -6
  33. package/src/crc.d.ts.map +1 -1
  34. package/src/crc.js +5 -15
  35. package/src/ibc.d.ts +5 -5
  36. package/src/ibc.d.ts.map +1 -1
  37. package/src/ibc.js +22 -40
  38. package/src/lib-board.d.ts +48 -49
  39. package/src/lib-board.d.ts.map +1 -1
  40. package/src/lib-board.js +32 -39
  41. package/src/mintHolder.d.ts.map +1 -1
  42. package/src/mintHolder.js +5 -6
  43. package/src/nameHub.d.ts.map +1 -1
  44. package/src/nameHub.js +17 -7
  45. package/src/proposals/network-proposal.d.ts.map +1 -1
  46. package/src/proposals/network-proposal.js +13 -10
  47. package/src/proposals/restart-vats-proposal.d.ts +1 -1
  48. package/src/proposals/restart-vats-proposal.d.ts.map +1 -1
  49. package/src/proposals/restart-vats-proposal.js +3 -3
  50. package/src/provisionPool.d.ts.map +1 -1
  51. package/src/provisionPool.js +9 -10
  52. package/src/provisionPoolKit.d.ts +14 -27
  53. package/src/provisionPoolKit.d.ts.map +1 -1
  54. package/src/provisionPoolKit.js +26 -29
  55. package/src/repl.js +1 -1
  56. package/src/types.d.ts +28 -27
  57. package/src/types.d.ts.map +1 -1
  58. package/src/types.js +49 -46
  59. package/src/vat-bank.d.ts +49 -48
  60. package/src/vat-bank.d.ts.map +1 -1
  61. package/src/vat-bank.js +55 -50
  62. package/src/vat-mints.d.ts +10 -10
  63. package/src/vat-mints.d.ts.map +1 -1
  64. package/src/vat-mints.js +6 -6
  65. package/src/vat-provisioning.d.ts.map +1 -1
  66. package/src/vat-provisioning.js +11 -6
  67. package/src/virtual-purse.d.ts +6 -6
  68. package/src/virtual-purse.d.ts.map +1 -1
  69. package/src/virtual-purse.js +34 -33
  70. package/src/walletFlags.js +1 -2
  71. package/tools/authorityViz.d.ts.map +1 -1
  72. package/tools/authorityViz.js +34 -25
  73. package/tools/bank-utils.d.ts +1 -1
  74. package/tools/bank-utils.d.ts.map +1 -1
  75. package/tools/bank-utils.js +12 -5
  76. package/tools/board-utils.d.ts +1 -1
  77. package/tools/board-utils.d.ts.map +1 -1
  78. package/tools/board-utils.js +22 -14
  79. package/tools/boot-test-utils.d.ts.map +1 -1
  80. package/tools/boot-test-utils.js +7 -9
@@ -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
- /** @type {MapStore<Brand, ERef<import('../src/vat-bank.js').VirtualPurse>>} */
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
- /** @type {SubscriptionRecord<import('../src/vat-bank.js').AssetDescriptor>} */
26
+ /**
27
+ * @type {SubscriptionRecord<
28
+ * import('../src/vat-bank.js').AssetDescriptor
29
+ * >}
30
+ */
24
31
  const { subscription, publication } = makeSubscriptionKit();
25
32
 
26
33
  /**
@@ -1,5 +1,5 @@
1
1
  export * from "@agoric/internal/src/marshal.js";
2
- export function makeAgoricNamesRemotesFromFakeStorage(fakeStorageKit: import("@agoric/internal/src/storage-test-utils.js").FakeStorageKit): AgoricNamesRemotes;
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":";AAkCO,sEAHI,OAAO,4CAA4C,EAAE,cAAc,GACjE,kBAAkB,CAmC9B;AAYM;;;;;;;;;;;;;;;;;;;;;EAGN;+BAhFY;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,OAAO,MAAM,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC,CAAC;IACjF,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"}
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"}
@@ -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<string, import('@agoric/internal/src/marshal.js').BoardRemote>,
15
- * instance: Record<string, Instance>,
16
- * vbankAsset: Record<string, VBankAssetDetail>,
17
- * reverse: Record<string, string>,
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("@agoric/internal/src/storage-test-utils.js").FakeStorageKit} fakeStorageKit
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
- /** @type {Array<[string, import('@agoric/vats/tools/board-utils.js').BoardRemote]>} */
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 upgrade.
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;AAKM,gDAFU,MAAM,KAAK,IAAI,SAM/B;mDA3JkD,2BAA2B;4CAClC,oBAAoB;6CACnB,qBAAqB;2CACvB,mBAAmB;6CACjB,qBAAqB;+CACnB,uBAAuB;sDAChB,8BAA8B;oDAChC,4BAA4B;2CACrC,mBAAmB"}
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"}
@@ -41,16 +41,16 @@ export const mockDProxy = d => d;
41
41
  export const makeMock = log =>
42
42
  harden({
43
43
  devices: {
44
- command: /** @type { any } */ ({ registerInboundHandler: noop }),
45
- mailbox: /** @type { any } */ ({
44
+ command: /** @type {any} */ ({ registerInboundHandler: noop }),
45
+ mailbox: /** @type {any} */ ({
46
46
  registerInboundHandler: noop,
47
47
  }),
48
- timer: /** @type { any } */ ({}),
49
- plugin: /** @type { any } */ ({ registerReceiver: noop }),
48
+ timer: /** @type {any} */ ({}),
49
+ plugin: /** @type {any} */ ({ registerReceiver: noop }),
50
50
  ...devices,
51
51
  },
52
52
  vats: {
53
- vattp: /** @type { any } */ (
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 { any } */
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);