@agoric/vats 0.15.2-dev-727e4af.0 → 0.15.2-dev-96c9ff5.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 (57) hide show
  1. package/package.json +27 -27
  2. package/src/centralSupply.d.ts +1 -1
  3. package/src/core/basic-behaviors.d.ts +1 -34
  4. package/src/core/basic-behaviors.d.ts.map +1 -1
  5. package/src/core/basic-behaviors.js +3 -0
  6. package/src/core/boot-chain.d.ts +25 -25
  7. package/src/core/boot-chain.d.ts.map +1 -1
  8. package/src/core/boot-sim.d.ts +1 -1
  9. package/src/core/boot-solo.d.ts +1 -1
  10. package/src/core/demoIssuers.d.ts +2 -2
  11. package/src/core/lib-boot.d.ts +1 -1
  12. package/src/core/startWalletFactory.d.ts +1 -1
  13. package/src/core/startWalletFactory.d.ts.map +1 -1
  14. package/src/core/startWalletFactory.js +2 -0
  15. package/src/core/utils.d.ts +12 -45
  16. package/src/core/utils.d.ts.map +1 -1
  17. package/src/core/utils.js +1 -0
  18. package/src/ibc.d.ts +5 -25
  19. package/src/ibc.d.ts.map +1 -1
  20. package/src/ibc.js +5 -1
  21. package/src/lib-board.d.ts +12 -8
  22. package/src/lib-board.d.ts.map +1 -1
  23. package/src/lib-board.js +11 -7
  24. package/src/localchain.d.ts +2 -2
  25. package/src/mintHolder.d.ts +2 -2
  26. package/src/nameHub.js +2 -2
  27. package/src/proposals/localchain-test.js +1 -1
  28. package/src/proposals/upgrade-zoe-proposal.d.ts +12 -12
  29. package/src/proposals/upgrade-zoe-proposal.d.ts.map +1 -1
  30. package/src/proposals/zcf-proposal.d.ts +12 -12
  31. package/src/proposals/zcf-proposal.d.ts.map +1 -1
  32. package/src/repl.d.ts +3 -3
  33. package/src/types.d.ts +10 -8
  34. package/src/vat-agoricNames.d.ts +3 -3
  35. package/src/vat-bank.d.ts +33 -442
  36. package/src/vat-bank.d.ts.map +1 -1
  37. package/src/vat-bank.js +19 -7
  38. package/src/vat-board.d.ts +7 -7
  39. package/src/vat-board.d.ts.map +1 -1
  40. package/src/vat-bridge.d.ts +1 -1
  41. package/src/vat-bridge.d.ts.map +1 -1
  42. package/src/vat-ibc.d.ts +1 -1
  43. package/src/vat-localchain.d.ts +3 -3
  44. package/src/vat-mints.d.ts +15 -15
  45. package/src/vat-network.d.ts +1 -1
  46. package/src/vat-priceAuthority.d.ts +1 -1
  47. package/src/vat-provisioning.d.ts +3 -3
  48. package/src/vat-zoe.d.ts +1 -1
  49. package/src/virtual-purse.d.ts +1 -111
  50. package/src/virtual-purse.d.ts.map +1 -1
  51. package/src/virtual-purse.js +1 -0
  52. package/tools/bank-utils.js +1 -1
  53. package/tools/board-utils.d.ts +3 -3
  54. package/tools/board-utils.d.ts.map +1 -1
  55. package/tools/boot-test-utils.d.ts +4 -74
  56. package/tools/boot-test-utils.d.ts.map +1 -1
  57. package/tools/boot-test-utils.js +2 -0
@@ -5,10 +5,10 @@
5
5
  */
6
6
  export function buildRootObject(_vatPowers: unknown, _vatParameters: unknown, baggage: import("@agoric/vat-data").Baggage): {
7
7
  getBoard: () => import("@endo/exo").Guarded<{
8
- getId(value: any): string;
9
- getValue(id: BoardId): any;
8
+ getId(value: import("@endo/marshal").PassableCap): string;
9
+ getValue(id: BoardId): import("@endo/marshal").PassableCap;
10
10
  lookup(...path: string[]): Promise<any>;
11
- has(val: any): boolean;
11
+ has(val: import("@endo/marshal").PassableCap): boolean;
12
12
  ids(): string[];
13
13
  getPublishingMarshaller(): import("@endo/exo").Guarded<{
14
14
  toCapData(val: any): import("@endo/marshal").CapData<string>;
@@ -25,12 +25,12 @@ export function buildRootObject(_vatPowers: unknown, _vatParameters: unknown, ba
25
25
  }>;
26
26
  makePublishingRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
27
27
  makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
28
- } & import("@endo/eventual-send").RemotableBrand<{}, {
28
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
29
29
  getBoard: () => import("@endo/exo").Guarded<{
30
- getId(value: any): string;
31
- getValue(id: BoardId): any;
30
+ getId(value: import("@endo/marshal").PassableCap): string;
31
+ getValue(id: BoardId): import("@endo/marshal").PassableCap;
32
32
  lookup(...path: string[]): Promise<any>;
33
- has(val: any): boolean;
33
+ has(val: import("@endo/marshal").PassableCap): boolean;
34
34
  ids(): string[];
35
35
  getPublishingMarshaller(): import("@endo/exo").Guarded<{
36
36
  toCapData(val: any): import("@endo/marshal").CapData<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"vat-board.d.ts","sourceRoot":"","sources":["vat-board.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,4CAJW,OAAO,kBACP,OAAO,WACP,OAAO,kBAAkB,EAAE,OAAO;;;qBA4Bk3N,OAAO;;;;;;;;;;;;;;;;;gDAApzG,WAAW,GAAE,QAAS,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;wFAApB,MAAM;;;;;;;;;;;;;;;;;;;;;0FAAN,MAAM;wFAAN,MAAM;GADjqH"}
1
+ {"version":3,"file":"vat-board.d.ts","sourceRoot":"","sources":["vat-board.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,4CAJW,OAAO,kBACP,OAAO,WACP,OAAO,kBAAkB,EAAE,OAAO;;;qBA4Bk8N,OAAO;;;;;;;;;;;;;;;;;gDAA54G,WAAW,GAAE,QAAS,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;wFAApB,MAAM;;;;;;;;;;;;;;;;;;;;;0FAAN,MAAM;wFAAN,MAAM;GADzpH"}
@@ -8,7 +8,7 @@ export function buildRootObject(vatPowers: any, _args: any, baggage: any): {
8
8
  setValue(value: string): Promise<void>;
9
9
  }>>;
10
10
  provideManagerForBridge: (bridgeDevice: BridgeDevice) => import("./types.js").BridgeManager;
11
- } & import("@endo/eventual-send").RemotableBrand<{}, {
11
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
12
12
  makeBridgedChainStorageRoot: (storageBridgeManagerP: ERef<import("./types.js").ScopedBridgeManager>, rootPath: string, options?: object) => Promise<import("@endo/exo").Guarded<{
13
13
  getPath(): string;
14
14
  getStoreKey(): Promise<globalThis.VStorageKey>;
@@ -1 +1 @@
1
- {"version":3,"file":"vat-bridge.d.ts","sourceRoot":"","sources":["vat-bridge.js"],"names":[],"mappings":"AAOA;yDAea,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,YAC9C,MAAM,YACN,MAAM;;;uDA0B2hJ;YAAE,QAAQ,CAAC,UAAS;SAAC;;;4CAArjB,YAAY;;yDA5B7gI,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,YAC9C,MAAM,YACN,MAAM;;;;oBA0BqiJ,CAAC;;;;;GADxjJ"}
1
+ {"version":3,"file":"vat-bridge.d.ts","sourceRoot":"","sources":["vat-bridge.js"],"names":[],"mappings":"AAOA;yDAea,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,YAC9C,MAAM,YACN,MAAM;;;uDA0B6kJ;YAAE,QAAQ,CAAC,UAAS;SAAC;;;4CAAvmB,YAAY;;yDA5B7gI,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,YAC9C,MAAM,YACN,MAAM;;;;oBA0BulJ,CAAC;;;;;GAD1mJ"}
package/src/vat-ibc.d.ts CHANGED
@@ -6,7 +6,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
6
6
  makeCallbacks: (dibcBridgeManager: import("./types.js").ScopedBridgeManager) => import("@endo/exo").Guarded<{
7
7
  downcall(method: string, obj: any): Promise<any>;
8
8
  }>;
9
- } & import("@endo/eventual-send").RemotableBrand<{}, {
9
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
10
10
  createHandlers: (callbacks: any) => {
11
11
  protocolHandler: import("@agoric/network").ProtocolHandler;
12
12
  bridgeHandler: import("./types.js").BridgeHandler;
@@ -12,7 +12,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
12
12
  public: {
13
13
  makeAccount(): Promise<import("@endo/exo").Guarded<{
14
14
  getAddress(): Promise<string>;
15
- deposit(payment: Payment): Promise<globalThis.Amount<globalThis.AssetKind>>;
15
+ deposit(payment: Payment): Promise<import("@agoric/ertp/exported.js").NatAmount | import("@agoric/ertp/exported.js").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp/exported.js").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp/exported.js").CopyBagAmount<import("@endo/patterns").Key>>;
16
16
  executeTx(messages: import("@agoric/cosmic-proto").TypedJson<unknown>[]): Promise<{
17
17
  '@type': string;
18
18
  }[]>;
@@ -28,7 +28,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
28
28
  }[]>;
29
29
  };
30
30
  }>;
31
- } & import("@endo/eventual-send").RemotableBrand<{}, {
31
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
32
32
  /**
33
33
  * Create a local chain that allows permissionlessly making fresh local
34
34
  * chain accounts, then using them to send chain queries and transactions.
@@ -42,7 +42,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
42
42
  public: {
43
43
  makeAccount(): Promise<import("@endo/exo").Guarded<{
44
44
  getAddress(): Promise<string>;
45
- deposit(payment: Payment): Promise<globalThis.Amount<globalThis.AssetKind>>;
45
+ deposit(payment: Payment): Promise<import("@agoric/ertp/exported.js").NatAmount | import("@agoric/ertp/exported.js").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp/exported.js").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp/exported.js").CopyBagAmount<import("@endo/patterns").Key>>;
46
46
  executeTx(messages: import("@agoric/cosmic-proto").TypedJson<unknown>[]): Promise<{
47
47
  '@type': string;
48
48
  }[]>;
@@ -1,8 +1,8 @@
1
1
  export function buildRootObject(): {
2
2
  getAllIssuerNames: () => string[];
3
- getIssuer: (issuerName: any) => globalThis.Issuer<globalThis.AssetKind>;
3
+ getIssuer: (issuerName: any) => globalThis.Issuer<globalThis.AssetKind, import("@endo/patterns").Key>;
4
4
  /** @param {string[]} issuerNames */
5
- getIssuers: (issuerNames: string[]) => globalThis.Issuer<globalThis.AssetKind>[];
5
+ getIssuers: (issuerNames: string[]) => globalThis.Issuer<globalThis.AssetKind, import("@endo/patterns").Key>[];
6
6
  /**
7
7
  * WARNING: a mint is ability to mint new digital assets, a very powerful
8
8
  * authority that is usually closely held. But this mint is for demo /
@@ -17,27 +17,27 @@ export function buildRootObject(): {
17
17
  * @param {any} issuerNameSingular For example, 'moola', or 'simolean'
18
18
  * @param {[AssetKind?, DisplayInfo?]} issuerArgs
19
19
  */
20
- makeMintAndIssuer: (issuerNameSingular: any, issuerArgs_0?: globalThis.AssetKind | undefined, issuerArgs_1?: globalThis.DisplayInfo | undefined) => globalThis.Issuer<"copySet" | "set" | "nat" | "copyBag">;
20
+ makeMintAndIssuer: (issuerNameSingular: any, issuerArgs_0?: globalThis.AssetKind | undefined, issuerArgs_1?: globalThis.DisplayInfo | undefined) => globalThis.Issuer<"copySet" | "set" | "nat" | "copyBag", any>;
21
21
  provideIssuerKit: (issuerName: any, ...issuerArgs: any[]) => {
22
- mint: globalThis.Mint<any>;
23
- issuer: globalThis.Issuer<any>;
22
+ mint: globalThis.Mint<any, any>;
23
+ issuer: globalThis.Issuer<any, any>;
24
24
  brand: globalThis.Brand<any>;
25
25
  };
26
26
  /**
27
27
  * @param {string} issuerName
28
28
  * @param {bigint} value
29
29
  */
30
- mintInitialPayment: (issuerName: string, value: bigint) => globalThis.Payment<globalThis.AssetKind> | undefined;
30
+ mintInitialPayment: (issuerName: string, value: bigint) => globalThis.Payment<globalThis.AssetKind, import("@endo/patterns").Key> | undefined;
31
31
  /**
32
32
  * @param {string[]} issuerNames
33
33
  * @param {bigint[]} values
34
34
  */
35
- mintInitialPayments: (issuerNames: string[], values: bigint[]) => (globalThis.Payment<globalThis.AssetKind> | undefined)[];
36
- } & import("@endo/eventual-send").RemotableBrand<{}, {
35
+ mintInitialPayments: (issuerNames: string[], values: bigint[]) => (globalThis.Payment<globalThis.AssetKind, import("@endo/patterns").Key> | undefined)[];
36
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
37
37
  getAllIssuerNames: () => string[];
38
- getIssuer: (issuerName: any) => globalThis.Issuer<globalThis.AssetKind>;
38
+ getIssuer: (issuerName: any) => globalThis.Issuer<globalThis.AssetKind, import("@endo/patterns").Key>;
39
39
  /** @param {string[]} issuerNames */
40
- getIssuers: (issuerNames: string[]) => globalThis.Issuer<globalThis.AssetKind>[];
40
+ getIssuers: (issuerNames: string[]) => globalThis.Issuer<globalThis.AssetKind, import("@endo/patterns").Key>[];
41
41
  /**
42
42
  * WARNING: a mint is ability to mint new digital assets, a very powerful
43
43
  * authority that is usually closely held. But this mint is for demo /
@@ -52,21 +52,21 @@ export function buildRootObject(): {
52
52
  * @param {any} issuerNameSingular For example, 'moola', or 'simolean'
53
53
  * @param {[AssetKind?, DisplayInfo?]} issuerArgs
54
54
  */
55
- makeMintAndIssuer: (issuerNameSingular: any, issuerArgs_0?: globalThis.AssetKind | undefined, issuerArgs_1?: globalThis.DisplayInfo | undefined) => globalThis.Issuer<"copySet" | "set" | "nat" | "copyBag">;
55
+ makeMintAndIssuer: (issuerNameSingular: any, issuerArgs_0?: globalThis.AssetKind | undefined, issuerArgs_1?: globalThis.DisplayInfo | undefined) => globalThis.Issuer<"copySet" | "set" | "nat" | "copyBag", any>;
56
56
  provideIssuerKit: (issuerName: any, ...issuerArgs: any[]) => {
57
- mint: globalThis.Mint<any>;
58
- issuer: globalThis.Issuer<any>;
57
+ mint: globalThis.Mint<any, any>;
58
+ issuer: globalThis.Issuer<any, any>;
59
59
  brand: globalThis.Brand<any>;
60
60
  };
61
61
  /**
62
62
  * @param {string} issuerName
63
63
  * @param {bigint} value
64
64
  */
65
- mintInitialPayment: (issuerName: string, value: bigint) => globalThis.Payment<globalThis.AssetKind> | undefined;
65
+ mintInitialPayment: (issuerName: string, value: bigint) => globalThis.Payment<globalThis.AssetKind, import("@endo/patterns").Key> | undefined;
66
66
  /**
67
67
  * @param {string[]} issuerNames
68
68
  * @param {bigint[]} values
69
69
  */
70
- mintInitialPayments: (issuerNames: string[], values: bigint[]) => (globalThis.Payment<globalThis.AssetKind> | undefined)[];
70
+ mintInitialPayments: (issuerNames: string[], values: bigint[]) => (globalThis.Payment<globalThis.AssetKind, import("@endo/patterns").Key> | undefined)[];
71
71
  }>;
72
72
  //# sourceMappingURL=vat-mints.d.ts.map
@@ -50,7 +50,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
50
50
  allocateICQControllerPort(): import("@agoric/vow").Vow<any>;
51
51
  allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<any>;
52
52
  }>;
53
- } & import("@endo/eventual-send").RemotableBrand<{}, {
53
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
54
54
  makeLoopbackProtocolHandler: (instancePrefix?: string | undefined) => import("@endo/exo").Guarded<{
55
55
  onCreate(_impl: any, _protocolHandler: any): Promise<void>;
56
56
  generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export function buildRootObject(_vatPowers: TerminationVatPowers, _vatParams: unknown, baggage: import("@agoric/vat-data").Baggage): {
10
10
  getRegistry: () => import("./priceAuthorityRegistry.js").PriceAuthorityRegistry;
11
- } & import("@endo/eventual-send").RemotableBrand<{}, {
11
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
12
12
  getRegistry: () => import("./priceAuthorityRegistry.js").PriceAuthorityRegistry;
13
13
  }>;
14
14
  //# sourceMappingURL=vat-priceAuthority.d.ts.map
@@ -9,16 +9,16 @@ export function buildRootObject(_vatPowers: unknown, _vatParameters: unknown, ba
9
9
  ingressIndex: number;
10
10
  }>;
11
11
  getNamesByAddressKit: () => {
12
- namesByAddress: import("./types.js").NameHub;
12
+ namesByAddress: import("./types.js").NameHub<any>;
13
13
  namesByAddressAdmin: import("@endo/exo").Farable<import("./types.js").NamesByAddressAdmin>;
14
14
  };
15
- } & import("@endo/eventual-send").RemotableBrand<{}, {
15
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
16
16
  register: (b: ERef<ClientCreator>, c: CommsVatRoot, v: VattpVat) => Promise<void>;
17
17
  pleaseProvision: (nickname: string, address: string, powerFlags: string[]) => Promise<{
18
18
  ingressIndex: number;
19
19
  }>;
20
20
  getNamesByAddressKit: () => {
21
- namesByAddress: import("./types.js").NameHub;
21
+ namesByAddress: import("./types.js").NameHub<any>;
22
22
  namesByAddressAdmin: import("@endo/exo").Farable<import("./types.js").NamesByAddressAdmin>;
23
23
  };
24
24
  }>;
package/src/vat-zoe.d.ts CHANGED
@@ -4,7 +4,7 @@ export function buildRootObject(vatPowers: any, _vatParams: any, zoeBaggage: any
4
4
  feeMintAccess: FeeMintAccess;
5
5
  }>;
6
6
  getZoeConfigFacet: () => any;
7
- } & import("@endo/eventual-send").RemotableBrand<{}, {
7
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
8
8
  buildZoe: (adminVat: any, feeIssuerConfig: any, zcfBundleName: any) => Promise<{
9
9
  zoeService: ZoeService;
10
10
  feeMintAccess: FeeMintAccess;
@@ -38,117 +38,7 @@ export function prepareVirtualPurse(zone: import("@agoric/zone").Zone): (vpc: ER
38
38
  brand: Brand;
39
39
  mint?: ERef<Mint>;
40
40
  escrowPurse?: ERef<Purse>;
41
- }) => Promise<{
42
- /**
43
- * Get the alleged Brand for this
44
- * Purse
45
- */
46
- getAllegedBrand: () => globalThis.ERef<{
47
- /**
48
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
49
- */
50
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
51
- getAllegedName: () => globalThis.ERef<string>;
52
- /**
53
- * Give information to UI on how
54
- * to display the amount.
55
- */
56
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
57
- getAmountShape: () => any;
58
- }>;
59
- /**
60
- * Get the amount contained in this
61
- * purse.
62
- */
63
- getCurrentAmount: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
64
- /**
65
- * Get a lossy
66
- * notifier for changes to this purse's balance.
67
- */
68
- getCurrentAmountNotifier: () => globalThis.ERef<{
69
- /**
70
- * Returns a promise for an update record as of an update count.
71
- * If the `updateCount` argument is omitted or differs from the current update count,
72
- * the promise promptly resolves to the current record.
73
- * Otherwise, after the next state change, the promise resolves to the resulting record.
74
- * This is an attenuated form of `subscribeAfter` whose return value stands alone and
75
- * does not allow consumers to pin a chain of historical PublicationRecords.
76
- * Used to make lossy ("latest") iterators.
77
- * NOTE: Use of `number` as an `updateCount` is deprecated.
78
- */
79
- getUpdateSince: (updateCount?: number | bigint | undefined) => globalThis.ERef<globalThis.UpdateRecord<globalThis.Amount<globalThis.AssetKind>>>;
80
- }>;
81
- /**
82
- * Deposit all the contents of payment into
83
- * this purse, returning the amount. If the optional argument `optAmount` does
84
- * not equal the amount of digital assets in the payment, throw an error.
85
- *
86
- * If payment is a promise, throw an error.
87
- */
88
- deposit: (args_0: globalThis.Payment<globalThis.AssetKind>, args_1?: any) => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
89
- /**
90
- * Return an object whose
91
- * `receive` method deposits to the current Purse.
92
- */
93
- getDepositFacet: () => globalThis.ERef<{
94
- /**
95
- * Deposit all the contents of payment
96
- * into the purse that made this facet, returning the amount. If the optional
97
- * argument `optAmount` does not equal the amount of digital assets in the
98
- * payment, throw an error.
99
- *
100
- * If payment is a promise, throw an error.
101
- */
102
- receive: (args_0: globalThis.Payment, args_1?: any) => globalThis.ERef<globalThis.Amount>;
103
- }>;
104
- /**
105
- * Withdraw amount from
106
- * this purse into a new Payment.
107
- */
108
- withdraw: (amount: globalThis.Amount<globalThis.AssetKind>) => globalThis.ERef<{
109
- /**
110
- * Get the allegedBrand, indicating
111
- * the type of digital asset this payment purports to be, and which issuer to
112
- * use. Because payments are not trusted, any method calls on payments should
113
- * be treated with suspicion and verified elsewhere.
114
- */
115
- getAllegedBrand: () => globalThis.ERef<{
116
- /**
117
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
118
- */
119
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
120
- getAllegedName: () => globalThis.ERef<string>;
121
- /**
122
- * Give information to UI on how
123
- * to display the amount.
124
- */
125
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
126
- getAmountShape: () => any;
127
- }>;
128
- }>;
129
- /**
130
- * The set of payments
131
- * withdrawn from this purse that are still live. These are the payments that
132
- * can still be recovered in emergencies by, for example, depositing into this
133
- * purse. Such a deposit action is like canceling an outstanding check because
134
- * you're tired of waiting for it. Once your cancellation is acknowledged, you
135
- * can spend the assets at stake on other things. Afterwards, if the recipient
136
- * of the original check finally gets around to depositing it, their deposit
137
- * fails.
138
- *
139
- * Returns an empty set if this issuer does not support recovery sets.
140
- */
141
- getRecoverySet: () => globalThis.ERef<import("@endo/patterns").CopySet<globalThis.Payment<globalThis.AssetKind>>>;
142
- /**
143
- * For use in emergencies, such as coming
144
- * back from a traumatic crash and upgrade. This deposits all the payments in
145
- * this purse's recovery set into the purse itself, returning the total amount
146
- * of assets recovered.
147
- *
148
- * Returns an empty amount if this issuer does not support recovery sets.
149
- */
150
- recoverAll: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
151
- }>;
41
+ }) => Promise<globalThis.Purse>;
152
42
  export type Retain = (pmt: Payment, optAmountShape?: Pattern) => Promise<Amount>;
153
43
  export type Redeem = (amt: Amount) => Promise<Payment>;
154
44
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-purse.d.ts","sourceRoot":"","sources":["virtual-purse.js"],"names":[],"mappings":"AAsBO,qDAHI,OAAO,gBACP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DjB;AAwLM,0CADK,OAAO,cAAc,EAAE,IAAI,SAK1B,IAAI,CAAC,sBAAsB,CAAC,qDAE5B;IACV,MAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,KAAS,EAAE,KAAK,CAAC;IACjB,IAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,WAAe,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCL;qBAhOa,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC;qBAC3D,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;gBAKjC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;;;gBAIjC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;iBAIjC,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,MAAM,CAAC"}
1
+ {"version":3,"file":"virtual-purse.d.ts","sourceRoot":"","sources":["virtual-purse.js"],"names":[],"mappings":"AAsBO,qDAHI,OAAO,gBACP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DjB;AAwLM,0CADK,OAAO,cAAc,EAAE,IAAI,SAK1B,IAAI,CAAC,sBAAsB,CAAC,qDAE5B;IACV,MAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,KAAS,EAAE,KAAK,CAAC;IACjB,IAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,WAAe,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;CAC3B,+BAkCL;qBAjOa,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC;qBAC3D,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;gBAKjC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;;;gBAIjC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;iBAIjC,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,MAAM,CAAC"}
@@ -303,6 +303,7 @@ export const prepareVirtualPurse = zone => {
303
303
  recoveryPurse,
304
304
  escrowPurse,
305
305
  }).purse;
306
+ // @ts-expect-error XXX
306
307
  return vpurse;
307
308
  };
308
309
 
@@ -5,7 +5,7 @@ import { Far } from '@endo/marshal';
5
5
 
6
6
  /** @param {Pick<IssuerKit, 'brand' | 'issuer'>[]} issuerKits */
7
7
  export const makeFakeBankKit = issuerKits => {
8
- /** @type {MapStore<Brand, ERef<Issuer>>} */
8
+ /** @type {MapStore<Brand, Issuer>} */
9
9
  const issuers = makeScalarMapStore();
10
10
  /**
11
11
  * @type {MapStore<
@@ -4,10 +4,10 @@ export function makeFakeBoard(initSequence?: number | bigint | undefined, option
4
4
  prefix?: string | undefined;
5
5
  crcDigits?: number | undefined;
6
6
  } | undefined): import("@endo/exo").Guarded<{
7
- getId(value: any): string;
8
- getValue(id: BoardId): any;
7
+ getId(value: import("@endo/marshal").PassableCap): string;
8
+ getValue(id: BoardId): import("@endo/marshal").PassableCap;
9
9
  lookup(...path: string[]): Promise<any>;
10
- has(val: any): boolean;
10
+ has(val: import("@endo/marshal").PassableCap): boolean;
11
11
  ids(): string[];
12
12
  getPublishingMarshaller(): import("@endo/exo").Guarded<{
13
13
  toCapData(val: any): import("@endo/marshal").CapData<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["board-utils.js"],"names":[],"mappings":";AAoCO,sEAHI,OAAO,4CAA4C,EAAE,cAAc,GACjE,kBAAkB,CA0C9B;AAYM;;;;;iBAIm6K,OAAO;;;;;;;;;;;;;;;;GADh7K;+BA1FY;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,MAAM,CACjB,MAAY,EACZ,OAAa,iCAAiC,EAAE,WAAW,CACtD,CAAC;IACN,QAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvC,UAAc,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjD,OAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
1
+ {"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["board-utils.js"],"names":[],"mappings":";AAoCO,sEAHI,OAAO,4CAA4C,EAAE,cAAc,GACjE,kBAAkB,CA0C9B;AAYM;;;;;iBAIm/K,OAAO;;;;;;;;;;;;;;;;GADhgL;+BA1FY;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,MAAM,CACjB,MAAY,EACZ,OAAa,iCAAiC,EAAE,WAAW,CACtD,CAAC;IACN,QAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvC,UAAc,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjD,OAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
@@ -34,7 +34,7 @@ export function makeMock(log: any): {
34
34
  _: string;
35
35
  };
36
36
  }>;
37
- } & import("@endo/eventual-send").RemotableBrand<{}, {
37
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
38
38
  addRemote: () => void;
39
39
  addEgress: () => void;
40
40
  addIngress: () => Promise<{
@@ -54,7 +54,7 @@ export function makeMock(log: any): {
54
54
  };
55
55
  timer: {
56
56
  createTimerService: () => Promise<import("@agoric/zoe/tools/manualTimer.js").ManualTimer>;
57
- } & import("@endo/eventual-send").RemotableBrand<{}, {
57
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
58
58
  createTimerService: () => Promise<import("@agoric/zoe/tools/manualTimer.js").ManualTimer>;
59
59
  }>;
60
60
  uploads: {
@@ -65,84 +65,14 @@ export function makeMock(log: any): {
65
65
  network: {
66
66
  registerProtocolHandler: () => void;
67
67
  makeLoopbackProtocolHandler: () => void;
68
- } & import("@endo/eventual-send").RemotableBrand<{}, {
68
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
69
69
  registerProtocolHandler: () => void;
70
70
  makeLoopbackProtocolHandler: () => void;
71
71
  }>;
72
72
  };
73
73
  };
74
74
  export function makePopulatedFakeVatAdmin(): {
75
- vatAdminService: {
76
- createVat: (bundleCap: any, options: any) => Promise<{
77
- root: unknown;
78
- adminNode: {
79
- done: () => Promise<any>;
80
- terminateWithFailure: () => void;
81
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
82
- } & import("@endo/eventual-send").RemotableBrand<{}, {
83
- done: () => Promise<any>;
84
- terminateWithFailure: () => void;
85
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
86
- }>;
87
- }> | {
88
- root: any;
89
- adminNode: import("@agoric/swingset-vat").VatAdminFacet;
90
- };
91
- createVatByName: (name: any) => Promise<{
92
- root: unknown;
93
- adminNode: {
94
- done: () => Promise<any>;
95
- terminateWithFailure: () => void;
96
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
97
- } & import("@endo/eventual-send").RemotableBrand<{}, {
98
- done: () => Promise<any>;
99
- terminateWithFailure: () => void;
100
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
101
- }>;
102
- } | {
103
- root: any;
104
- adminNode: import("@agoric/swingset-vat").VatAdminFacet;
105
- }>;
106
- getBundleCap: (bundleID: any) => Promise<any>;
107
- waitForBundleCap: (bundleID: any) => Promise<any>;
108
- getNamedBundleCap: (name: any) => Promise<any>;
109
- getBundleIDByName: (name: any) => Promise<string>;
110
- } & import("@endo/eventual-send").RemotableBrand<{}, {
111
- createVat: (bundleCap: any, options: any) => Promise<{
112
- root: unknown;
113
- adminNode: {
114
- done: () => Promise<any>;
115
- terminateWithFailure: () => void;
116
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
117
- } & import("@endo/eventual-send").RemotableBrand<{}, {
118
- done: () => Promise<any>;
119
- terminateWithFailure: () => void;
120
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
121
- }>;
122
- }> | {
123
- root: any;
124
- adminNode: import("@agoric/swingset-vat").VatAdminFacet;
125
- };
126
- createVatByName: (name: any) => Promise<{
127
- root: unknown;
128
- adminNode: {
129
- done: () => Promise<any>;
130
- terminateWithFailure: () => void;
131
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
132
- } & import("@endo/eventual-send").RemotableBrand<{}, {
133
- done: () => Promise<any>;
134
- terminateWithFailure: () => void;
135
- upgrade: (_bundleCap: any, _options: any) => never; /** @type {import('@agoric/swingset-vat').VatAdminFacet} */
136
- }>;
137
- } | {
138
- root: any;
139
- adminNode: import("@agoric/swingset-vat").VatAdminFacet;
140
- }>;
141
- getBundleCap: (bundleID: any) => Promise<any>;
142
- waitForBundleCap: (bundleID: any) => Promise<any>;
143
- getNamedBundleCap: (name: any) => Promise<any>;
144
- getBundleIDByName: (name: any) => Promise<string>;
145
- }>;
75
+ vatAdminService: any;
146
76
  vatAdminRoot: any;
147
77
  };
148
78
  export function mockSwingsetVats(mock: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"boot-test-utils.d.ts","sourceRoot":"","sources":["boot-test-utils.js"],"names":[],"mappings":";;;;;;;;;;;AAiCO,6BAAqB;AAE5B,qBAAqB;AACrB,yBADW,MAAM,CACgB;AAE1B;;;;;;;iBAGmB,GAAG;iBACH,GAAG;eAGL,GAAG;gBACF,GAAG;;;eAIJ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BvB;AAEG;;;;;;;oEA+CD,2DAA2D;;;;oEAA3D,2DAA2D;;;;;;;;;;;oEAA3D,2DAA2D;;;;oEAA3D,2DAA2D;;;;;;;;;;;;;;;;oEAA3D,2DAA2D;;;;oEAA3D,2DAA2D;;;;;;;;;;;oEAA3D,2DAA2D;;;;oEAA3D,2DAA2D;;;;;;;;;;;;EAkBhE;AAEM,iDAON;mDAjJkD,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":";;;;;;;;;;;AAiCO,6BAAqB;AAE5B,qBAAqB;AACrB,yBADW,MAAM,CACgB;AAE1B;;;;;;;iBAGmB,GAAG;iBACH,GAAG;eAGL,GAAG;gBACF,GAAG;;;eAIJ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BvB;AAEG;;;EAmEN;AAEM,iDAON;mDAnJkD,2BAA2B;4CAClC,oBAAoB;6CACnB,qBAAqB;2CACvB,mBAAmB;6CACjB,qBAAqB;+CACnB,uBAAuB;sDAChB,8BAA8B;oDAChC,4BAA4B;2CACrC,mBAAmB"}
@@ -132,6 +132,8 @@ export const makePopulatedFakeVatAdmin = () => {
132
132
  return createVat(fakeNameToCap.get(name) || Fail`unknown vat ${name}`);
133
133
  };
134
134
 
135
+ // FIXME(TS9006) remove 'any'
136
+ /** @type {any} */
135
137
  const vatAdminService = Far('vatAdminSvc', {
136
138
  ...fakeVatAdmin,
137
139
  createVat,