@agoric/zoe 0.26.3-dev-727699e.0 → 0.26.3-dev-baa7c08.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 (117) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +226 -236
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +15 -15
  4. package/src/cleanProposal.d.ts +1 -0
  5. package/src/cleanProposal.d.ts.map +1 -1
  6. package/src/cleanProposal.js +4 -0
  7. package/src/contractFacet/exit.d.ts +1 -1
  8. package/src/contractFacet/exit.d.ts.map +1 -1
  9. package/src/contractFacet/types.d.ts +174 -0
  10. package/src/contractFacet/types.d.ts.map +1 -0
  11. package/src/contractFacet/{types-ambient.d.ts → types.ts} +42 -23
  12. package/src/contractFacet/vatRoot.d.ts +8 -2
  13. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  14. package/src/contractFacet/vatRoot.js +5 -4
  15. package/src/contractFacet/zcfMint.d.ts +1 -0
  16. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  17. package/src/contractFacet/zcfMint.js +4 -2
  18. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  19. package/src/contractFacet/zcfSeat.js +1 -0
  20. package/src/contractFacet/zcfZygote.d.ts +9 -1
  21. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  22. package/src/contractFacet/zcfZygote.js +15 -3
  23. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  24. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  25. package/src/contractSupport/atomicTransfer.js +4 -0
  26. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  27. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  28. package/src/contractSupport/priceAuthorityInitial.js +1 -0
  29. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  30. package/src/contractSupport/types-ambient.js +1 -0
  31. package/src/contractSupport/zoeHelpers.d.ts +5 -0
  32. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  33. package/src/contractSupport/zoeHelpers.js +1 -0
  34. package/src/contracts/atomicSwap.d.ts +1 -1
  35. package/src/contracts/auction/index.d.ts +3 -3
  36. package/src/contracts/automaticRefund.d.ts +3 -3
  37. package/src/contracts/autoswap.d.ts +4 -0
  38. package/src/contracts/autoswap.d.ts.map +1 -1
  39. package/src/contracts/autoswap.js +4 -0
  40. package/src/contracts/barterExchange.d.ts +2 -2
  41. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  42. package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
  43. package/src/contracts/coveredCall-durable.d.ts +1 -1
  44. package/src/contracts/coveredCall.d.ts +1 -1
  45. package/src/contracts/loan/index.d.ts +1 -1
  46. package/src/contracts/loan/types-ambient.d.ts +13 -13
  47. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  48. package/src/contracts/loan/types-ambient.js +17 -17
  49. package/src/contracts/mintPayments.d.ts +2 -2
  50. package/src/contracts/oracle.d.ts +3 -0
  51. package/src/contracts/oracle.d.ts.map +1 -1
  52. package/src/contracts/oracle.js +1 -0
  53. package/src/contracts/priceAggregator.d.ts +2 -0
  54. package/src/contracts/priceAggregator.d.ts.map +1 -1
  55. package/src/contracts/priceAggregator.js +6 -2
  56. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  57. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  58. package/src/contracts/scaledPriceAuthority.js +1 -0
  59. package/src/contracts/sellItems.d.ts +1 -1
  60. package/src/contracts/simpleExchange.d.ts +5 -0
  61. package/src/contracts/simpleExchange.d.ts.map +1 -1
  62. package/src/contracts/simpleExchange.js +4 -0
  63. package/src/contracts/types-ambient.d.ts +7 -7
  64. package/src/contracts/types-ambient.d.ts.map +1 -1
  65. package/src/contracts/types-ambient.js +7 -7
  66. package/src/contracts/valueVow.contract.d.ts +4 -0
  67. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  68. package/src/contracts/valueVow.contract.js +1 -0
  69. package/src/internal-types.d.ts +6 -1
  70. package/src/internal-types.d.ts.map +1 -1
  71. package/src/internal-types.js +5 -0
  72. package/src/typeGuards.d.ts +7 -5
  73. package/src/typeGuards.d.ts.map +1 -1
  74. package/src/typeGuards.js +4 -3
  75. package/src/types-index.d.ts +3 -0
  76. package/src/types-index.js +2 -0
  77. package/src/zoeService/feeMint.d.ts +1 -0
  78. package/src/zoeService/feeMint.d.ts.map +1 -1
  79. package/src/zoeService/feeMint.js +4 -0
  80. package/src/zoeService/installationStorage.d.ts +3 -2
  81. package/src/zoeService/installationStorage.d.ts.map +1 -1
  82. package/src/zoeService/installationStorage.js +1 -0
  83. package/src/zoeService/internal-types.d.ts +9 -3
  84. package/src/zoeService/internal-types.d.ts.map +1 -1
  85. package/src/zoeService/internal-types.js +8 -3
  86. package/src/zoeService/invitationQueries.d.ts +3 -3
  87. package/src/zoeService/invitationQueries.js +3 -3
  88. package/src/zoeService/makeInvitation.d.ts +1 -0
  89. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  90. package/src/zoeService/makeInvitation.js +3 -0
  91. package/src/zoeService/offer/offer.d.ts +1 -0
  92. package/src/zoeService/offer/offer.d.ts.map +1 -1
  93. package/src/zoeService/offer/offer.js +3 -1
  94. package/src/zoeService/types-ambient.d.ts +0 -226
  95. package/src/zoeService/types-ambient.d.ts.map +1 -1
  96. package/src/zoeService/types-ambient.js +4 -327
  97. package/src/zoeService/types.d.ts +235 -0
  98. package/src/zoeService/types.d.ts.map +1 -0
  99. package/src/zoeService/types.ts +299 -0
  100. package/src/zoeService/utils.d.ts +1 -4
  101. package/src/zoeService/utils.test-d.ts +1 -0
  102. package/src/zoeService/zoe.d.ts +11 -1
  103. package/src/zoeService/zoe.d.ts.map +1 -1
  104. package/src/zoeService/zoe.js +8 -1
  105. package/src/zoeService/zoeStorageManager.d.ts +5 -5
  106. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  107. package/src/zoeService/zoeStorageManager.js +4 -1
  108. package/tools/scriptedOracle.d.ts +6 -2
  109. package/tools/scriptedOracle.d.ts.map +1 -1
  110. package/tools/scriptedOracle.js +4 -0
  111. package/tools/setup-zoe.d.ts +4 -3
  112. package/tools/setup-zoe.d.ts.map +1 -1
  113. package/tools/setup-zoe.js +4 -0
  114. package/src/contractFacet/internal-types.d.ts +0 -8
  115. package/src/contractFacet/internal-types.d.ts.map +0 -1
  116. package/src/contractFacet/internal-types.js +0 -15
  117. package/src/contractFacet/types-ambient.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/zoe",
3
- "version": "0.26.3-dev-727699e.0+727699e",
3
+ "version": "0.26.3-dev-baa7c08.0+baa7c08",
4
4
  "description": "Zoe: the Smart Contract Framework for Offer Enforcement",
5
5
  "type": "module",
6
6
  "main": "./src/zoeService/zoe.js",
@@ -43,17 +43,17 @@
43
43
  },
44
44
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
45
45
  "dependencies": {
46
- "@agoric/base-zone": "0.1.1-dev-727699e.0+727699e",
47
- "@agoric/ertp": "0.16.3-dev-727699e.0+727699e",
48
- "@agoric/internal": "0.3.3-dev-727699e.0+727699e",
49
- "@agoric/notifier": "0.6.3-dev-727699e.0+727699e",
50
- "@agoric/store": "0.9.3-dev-727699e.0+727699e",
51
- "@agoric/swingset-liveslots": "0.10.3-dev-727699e.0+727699e",
52
- "@agoric/swingset-vat": "0.32.3-dev-727699e.0+727699e",
53
- "@agoric/time": "0.3.3-dev-727699e.0+727699e",
54
- "@agoric/vat-data": "0.5.3-dev-727699e.0+727699e",
55
- "@agoric/vow": "0.1.1-dev-727699e.0+727699e",
56
- "@agoric/zone": "0.2.3-dev-727699e.0+727699e",
46
+ "@agoric/base-zone": "0.1.1-dev-baa7c08.0+baa7c08",
47
+ "@agoric/ertp": "0.16.3-dev-baa7c08.0+baa7c08",
48
+ "@agoric/internal": "0.3.3-dev-baa7c08.0+baa7c08",
49
+ "@agoric/notifier": "0.6.3-dev-baa7c08.0+baa7c08",
50
+ "@agoric/store": "0.9.3-dev-baa7c08.0+baa7c08",
51
+ "@agoric/swingset-liveslots": "0.10.3-dev-baa7c08.0+baa7c08",
52
+ "@agoric/swingset-vat": "0.32.3-dev-baa7c08.0+baa7c08",
53
+ "@agoric/time": "0.3.3-dev-baa7c08.0+baa7c08",
54
+ "@agoric/vat-data": "0.5.3-dev-baa7c08.0+baa7c08",
55
+ "@agoric/vow": "0.1.1-dev-baa7c08.0+baa7c08",
56
+ "@agoric/zone": "0.2.3-dev-baa7c08.0+baa7c08",
57
57
  "@endo/bundle-source": "^3.5.1",
58
58
  "@endo/captp": "^4.4.4",
59
59
  "@endo/common": "^1.2.9",
@@ -70,7 +70,7 @@
70
70
  "yargs-parser": "^21.1.1"
71
71
  },
72
72
  "devDependencies": {
73
- "@agoric/kmarshal": "0.1.1-dev-727699e.0+727699e",
73
+ "@agoric/kmarshal": "0.1.1-dev-baa7c08.0+baa7c08",
74
74
  "@endo/init": "^1.1.8",
75
75
  "ava": "^5.3.0",
76
76
  "c8": "^10.1.2",
@@ -98,7 +98,7 @@
98
98
  "access": "public"
99
99
  },
100
100
  "typeCoverage": {
101
- "atLeast": 85.11
101
+ "atLeast": 85.04
102
102
  },
103
- "gitHead": "727699e98ab06db2fc47fcc4dce7bbe3354b64c7"
103
+ "gitHead": "baa7c08ac81c53b4cf10a2bd76fe86baa7878c8a"
104
104
  }
@@ -6,4 +6,5 @@ export function cleanKeywords(uncleanKeywordRecord: {
6
6
  export function coerceAmountPatternKeywordRecord(allegedAmountKeywordRecord: any, getAssetKindByBrand: any): Record<string | number | symbol, any>;
7
7
  export function coerceAmountKeywordRecord(allegedAmountKeywordRecord: unknown, getAssetKindByBrand: any): AmountKeywordRecord;
8
8
  export function cleanProposal(proposal: Proposal, getAssetKindByBrand: GetAssetKindByBrand): ProposalRecord;
9
+ import type { Proposal } from '@agoric/zoe';
9
10
  //# sourceMappingURL=cleanProposal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanProposal.d.ts","sourceRoot":"","sources":["cleanProposal.js"],"names":[],"mappings":"AAWA,iCAAkC,GAAG,CAAC;AAa/B,sDAYN;AAMM,oDAHI;IAAC,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,GACnB,MAAM,EAAE,CAcpB;AAEM,mJAsBN;AAQM,sEAJI,OAAO,uBACP,GAAC,GACC,mBAAmB,CAa/B;AA4CM,wCAJI,QAAQ,uBACR,mBAAmB,GACjB,cAAc,CA6B1B"}
1
+ {"version":3,"file":"cleanProposal.d.ts","sourceRoot":"","sources":["cleanProposal.js"],"names":[],"mappings":"AAWA,iCAAkC,GAAG,CAAC;AAiB/B,sDAYN;AAMM,oDAHI;IAAC,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,GACnB,MAAM,EAAE,CAcpB;AAEM,mJAsBN;AAQM,sEAJI,OAAO,uBACP,GAAC,GACC,mBAAmB,CAa/B;AA4CM,wCAJI,QAAQ,uBACR,mBAAmB,GACjB,cAAc,CA6B1B;8BA9JoC,aAAa"}
@@ -11,6 +11,10 @@ const { ownKeys } = Reflect;
11
11
 
12
12
  export const MAX_KEYWORD_LENGTH = 100;
13
13
 
14
+ /**
15
+ * @import {ExitRule, Proposal} from '@agoric/zoe';
16
+ */
17
+
14
18
  const firstCapASCII = /^[A-Z][a-zA-Z0-9_$]*$/;
15
19
 
16
20
  // We adopt simple requirements on keywords so that they do not accidentally
@@ -1,2 +1,2 @@
1
- export function makeMakeExiter(baggage: any): (proposal: ProposalRecord, zcfSeat: ZCFSeat) => ExitObj;
1
+ export function makeMakeExiter(baggage: any): (proposal: globalThis.ProposalRecord, zcfSeat: globalThis.ZCFSeat) => ExitObj;
2
2
  //# sourceMappingURL=exit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAwBO,sGAwGN"}
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAwBO,4HAwGN"}
@@ -0,0 +1,174 @@
1
+ import type { Passable } from '@endo/pass-style';
2
+ import type { ERef } from '@endo/far';
3
+ import type { Pattern } from '@endo/patterns';
4
+ import type { AdditionalDisplayInfo, Amount, AssetKind, Brand, Issuer, Payment } from '@agoric/ertp';
5
+ import type { Subscriber } from '@agoric/notifier';
6
+ import type { AmountKeywordRecord, ExitRule, FeeMintAccess, Instance, InvitationDetails, ProposalRecord, UserSeat, ZoeService } from '../types-index.js';
7
+ /**
8
+ * Any passable non-thenable. Often an explanatory string.
9
+ */
10
+ export type Completion = Passable;
11
+ export type ZCFMakeEmptySeatKit = (exit?: ExitRule | undefined) => ZcfSeatKit;
12
+ export type InvitationAmount = Amount<'set', InvitationDetails>;
13
+ /**
14
+ * Zoe Contract Facet
15
+ *
16
+ * The Zoe interface specific to a contract instance. The Zoe Contract
17
+ * Facet is an API object used by running contract instances to access
18
+ * the Zoe state for that instance. The Zoe Contract Facet is accessed
19
+ * synchronously from within the contract, and usually is referred to
20
+ * in code as zcf.
21
+ */
22
+ export type ZCF<CT = Record<string, unknown>> = {
23
+ /**
24
+ * - atomically reallocate amounts among seats.
25
+ */
26
+ atomicRearrange: (transfers: TransferPart[]) => void;
27
+ /**
28
+ * - check
29
+ * whether a keyword is valid and unique and could be added in
30
+ * `saveIssuer`
31
+ */
32
+ assertUniqueKeyword: (keyword: Keyword) => void;
33
+ /**
34
+ * Informs Zoe about an issuer and returns a promise for acknowledging
35
+ * when the issuer is added and ready.
36
+ *
37
+ * @returns the AmountMath and brand synchronously accessible after
38
+ * saving
39
+ */
40
+ saveIssuer: <I extends Issuer>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M> ? IssuerRecord<K, M> : never>;
41
+ /**
42
+ * Make a credible Zoe invitation for a particular smart contract
43
+ * indicated by the `instance` in the details of the invitation. Zoe
44
+ * also puts the `installation` and a unique `handle` in the details
45
+ * of the invitation. The contract must provide a `description` for
46
+ * the invitation and should include whatever information is necessary
47
+ * for a potential buyer of the invitation to know what they are
48
+ * getting in the `customDetails`. `customDetails` will be
49
+ * placed in the details of the invitation.
50
+ */
51
+ makeInvitation: <R, A = undefined>(offerHandler: OfferHandler<ERef<R>, A>, description: string, customDetails?: object, proposalShape?: Pattern) => Promise<Invitation<R, A>>;
52
+ shutdown: (completion: Completion) => void;
53
+ shutdownWithFailure: import('@agoric/swingset-vat').ShutdownWithFailure;
54
+ getZoeService: () => ERef<ZoeService>;
55
+ getInvitationIssuer: () => Issuer<'set'>;
56
+ getTerms: () => StandardTerms & CT;
57
+ getBrandForIssuer: <K extends AssetKind>(issuer: Issuer<K>) => Brand<K>;
58
+ getIssuerForBrand: <K_1 extends AssetKind>(brand: Brand<K_1>) => Issuer<K_1>;
59
+ getAssetKind: (brand: Brand) => AssetKind;
60
+ makeZCFMint: <K_2 extends AssetKind = 'nat'>(keyword: Keyword, assetKind?: K_2 | undefined, displayInfo?: AdditionalDisplayInfo, options?: import('@agoric/ertp').IssuerOptionsRecord) => Promise<ZCFMint<K_2>>;
61
+ registerFeeMint: ZCFRegisterFeeMint;
62
+ makeEmptySeatKit: ZCFMakeEmptySeatKit;
63
+ setTestJig: SetTestJig;
64
+ stopAcceptingOffers: () => Promise<void>;
65
+ setOfferFilter: (strings: Array<string>) => Promise<void>;
66
+ getOfferFilter: () => Promise<Array<string>>;
67
+ getInstance: () => Instance;
68
+ };
69
+ export type TransferPart = [
70
+ fromSeat?: ZCFSeat,
71
+ toSeat?: ZCFSeat,
72
+ fromAmounts?: AmountKeywordRecord,
73
+ toAmounts?: AmountKeywordRecord
74
+ ];
75
+ export type ZCFRegisterFeeMint = (keyword: Keyword, allegedFeeMintAccess: FeeMintAccess) => Promise<ZCFMint<'nat'>>;
76
+ /**
77
+ * Provide a jig object for testing purposes only.
78
+ *
79
+ * The contract code provides a callback whose return result will
80
+ * be made available to the test that started this contract. The
81
+ * supplied callback will only be called in a testing context,
82
+ * never in production; i.e., it is only called if `testJigSetter`
83
+ * was supplied.
84
+ *
85
+ * If no `testFn` is supplied, then an empty jig will be used.
86
+ * An additional `zcf` property set to the current ContractFacet
87
+ * will be appended to the returned jig object (overriding any
88
+ * provided by the `testFn`).
89
+ */
90
+ export type SetTestJig = (testFn?: () => Record<string, unknown>) => void;
91
+ export type ZCFMint<K extends AssetKind = AssetKind> = {
92
+ getIssuerRecord: () => IssuerRecord<K>;
93
+ /**
94
+ * All the amounts in gains must be of this ZCFMint's brand.
95
+ * The gains' keywords are in the namespace of that seat.
96
+ * Add the gains to that seat's allocation.
97
+ * The resulting state must be offer safe. (Currently, increasing assets can
98
+ * never violate offer safety anyway.)
99
+ *
100
+ * Mint that amount of assets into the pooled purse.
101
+ * If a seat is provided, it is returned. Otherwise a new seat is
102
+ * returned.
103
+ */
104
+ mintGains: (gains: AmountKeywordRecord, zcfSeat?: ZCFSeat) => ZCFSeat;
105
+ /**
106
+ * All the amounts in losses must be of this ZCFMint's brand.
107
+ * The losses' keywords are in the namespace of that seat.
108
+ * Subtract losses from that seat's allocation.
109
+ * The resulting state must be offer safe.
110
+ *
111
+ * Burn that amount of assets from the pooled purse.
112
+ */
113
+ burnLosses: (losses: AmountKeywordRecord, zcfSeat: ZCFSeat) => void;
114
+ };
115
+ /**
116
+ * fail called with the reason for this failure, where reason is
117
+ * normally an instanceof Error.
118
+ */
119
+ export type ZCFSeatFail = (reason: unknown) => Error;
120
+ export type ZCFSeat = import('@endo/pass-style').RemotableObject & {
121
+ exit: (completion?: Completion) => void;
122
+ fail: ZCFSeatFail;
123
+ getSubscriber: () => Promise<Subscriber<Allocation>>;
124
+ hasExited: () => boolean;
125
+ getProposal: () => ProposalRecord;
126
+ /**
127
+ * @param brand used for filling in an empty amount if the `keyword`
128
+ * is not present in the allocation
129
+ */
130
+ getAmountAllocated: <B extends Brand>(keyword: Keyword, brand?: B) => B extends Brand<infer K> ? Amount<K> : Amount;
131
+ getCurrentAllocation: () => Allocation;
132
+ isOfferSafe: (newAllocation: Allocation) => boolean;
133
+ };
134
+ export type ZcfSeatKit = {
135
+ zcfSeat: ZCFSeat;
136
+ userSeat: Promise<UserSeat>;
137
+ };
138
+ export type HandleOffer<OR, OA> = (seat: ZCFSeat, offerArgs: OA) => OR;
139
+ export type OfferHandler<OR = unknown, OA = never> = HandleOffer<OR, OA> | {
140
+ handle: HandleOffer<OR, OA>;
141
+ };
142
+ export type ContractMeta<SF extends import('../zoeService/utils').ContractStartFunction = import('../zoeService/utils').ContractStartFunction> = {
143
+ customTermsShape?: Record<Parameters<SF>[0] extends ZCF<infer CT> ? keyof CT : never, Pattern>;
144
+ privateArgsShape?: {
145
+ [K in keyof Parameters<SF>[1]]: Pattern;
146
+ };
147
+ /**
148
+ * - `none` means that the contract is not upgradable.
149
+ * - `canUpgrade` means this code can perform an upgrade
150
+ * - `canBeUpgraded` means that the contract stores kinds durably such that the next version can upgrade
151
+ */
152
+ upgradability?: 'none' | 'canBeUpgraded' | 'canUpgrade' | undefined;
153
+ };
154
+ /**
155
+ * API for a contract start function.
156
+ *
157
+ * CAVEAT: assumes synchronous
158
+ */
159
+ export type ContractStartFn<PF = any, CF = any, CT = any, PA = any> = (zcf: ZCF<CT>, privateArgs: PA, baggage: import('@agoric/vat-data').Baggage) => ContractStartFnResult<PF, CF>;
160
+ export type ContractStartFnResult<PF, CF> = {
161
+ publicFacet?: PF;
162
+ creatorFacet?: CF;
163
+ creatorInvitation?: Promise<Invitation<any, any>> | undefined;
164
+ };
165
+ export type ContractOf<S extends (...args: any) => any> = import('../zoeService/utils').ContractOf<S>;
166
+ export type AdminFacet = import('../zoeService/utils').AdminFacet<any>;
167
+ declare const OfferReturn: unique symbol;
168
+ declare const OfferArgs: unique symbol;
169
+ export type Invitation<R = unknown, A = undefined> = Payment<'set', InvitationDetails> & {
170
+ [OfferReturn]?: R;
171
+ [OfferArgs]?: A;
172
+ };
173
+ export {};
174
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
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GAAG,OAAO,EAAE,CAAC,GAAG,SAAS,IAAI,OAAO,CAC1D,KAAK,EACL,iBAAiB,CAClB,GAAG;IAEF,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;CACjB,CAAC"}
@@ -1,14 +1,33 @@
1
- /// <reference types="@agoric/ertp/exported" />
2
- /// <reference types="@endo/pass-style" />
3
- /// <reference path="../zoeService/utils.d.ts" />
1
+ import type { Passable } from '@endo/pass-style';
2
+ import type { ERef } from '@endo/far';
3
+ import type { Pattern } from '@endo/patterns';
4
+ import type {
5
+ AdditionalDisplayInfo,
6
+ Amount,
7
+ AssetKind,
8
+ Brand,
9
+ Issuer,
10
+ Payment,
11
+ } from '@agoric/ertp';
12
+ import type { Subscriber } from '@agoric/notifier';
13
+ import type {
14
+ AmountKeywordRecord,
15
+ ExitRule,
16
+ FeeMintAccess,
17
+ Instance,
18
+ InvitationDetails,
19
+ ProposalRecord,
20
+ UserSeat,
21
+ ZoeService,
22
+ } from '../types-index.js';
4
23
 
5
24
  /**
6
25
  * Any passable non-thenable. Often an explanatory string.
7
26
  */
8
- type Completion = import('@endo/pass-style').Passable;
9
- type ZCFMakeEmptySeatKit = (exit?: ExitRule | undefined) => ZcfSeatKit;
27
+ export type Completion = Passable;
28
+ export type ZCFMakeEmptySeatKit = (exit?: ExitRule | undefined) => ZcfSeatKit;
10
29
 
11
- type InvitationAmount = Amount<'set', InvitationDetails>;
30
+ export type InvitationAmount = Amount<'set', InvitationDetails>;
12
31
 
13
32
  /**
14
33
  * Zoe Contract Facet
@@ -19,7 +38,7 @@ type InvitationAmount = Amount<'set', InvitationDetails>;
19
38
  * synchronously from within the contract, and usually is referred to
20
39
  * in code as zcf.
21
40
  */
22
- type ZCF<CT = Record<string, unknown>> = {
41
+ export type ZCF<CT = Record<string, unknown>> = {
23
42
  /**
24
43
  * - atomically reallocate amounts among seats.
25
44
  */
@@ -65,7 +84,7 @@ type ZCF<CT = Record<string, unknown>> = {
65
84
  getTerms: () => StandardTerms & CT;
66
85
  getBrandForIssuer: <K extends AssetKind>(issuer: Issuer<K>) => Brand<K>;
67
86
  getIssuerForBrand: <K_1 extends AssetKind>(brand: Brand<K_1>) => Issuer<K_1>;
68
- getAssetKind: GetAssetKindByBrand;
87
+ getAssetKind: (brand: Brand) => AssetKind;
69
88
  makeZCFMint: <K_2 extends AssetKind = 'nat'>(
70
89
  keyword: Keyword,
71
90
  assetKind?: K_2 | undefined,
@@ -81,14 +100,14 @@ type ZCF<CT = Record<string, unknown>> = {
81
100
  getInstance: () => Instance;
82
101
  };
83
102
 
84
- type TransferPart = [
103
+ export type TransferPart = [
85
104
  fromSeat?: ZCFSeat,
86
105
  toSeat?: ZCFSeat,
87
106
  fromAmounts?: AmountKeywordRecord,
88
107
  toAmounts?: AmountKeywordRecord,
89
108
  ];
90
109
 
91
- type ZCFRegisterFeeMint = (
110
+ export type ZCFRegisterFeeMint = (
92
111
  keyword: Keyword,
93
112
  allegedFeeMintAccess: FeeMintAccess,
94
113
  ) => Promise<ZCFMint<'nat'>>;
@@ -106,8 +125,8 @@ type ZCFRegisterFeeMint = (
106
125
  * will be appended to the returned jig object (overriding any
107
126
  * provided by the `testFn`).
108
127
  */
109
- type SetTestJig = (testFn?: () => Record<string, unknown>) => void;
110
- type ZCFMint<K extends AssetKind = AssetKind> = {
128
+ export type SetTestJig = (testFn?: () => Record<string, unknown>) => void;
129
+ export type ZCFMint<K extends AssetKind = AssetKind> = {
111
130
  getIssuerRecord: () => IssuerRecord<K>;
112
131
  /**
113
132
  * All the amounts in gains must be of this ZCFMint's brand.
@@ -135,8 +154,8 @@ type ZCFMint<K extends AssetKind = AssetKind> = {
135
154
  * fail called with the reason for this failure, where reason is
136
155
  * normally an instanceof Error.
137
156
  */
138
- type ZCFSeatFail = (reason: unknown) => Error;
139
- type ZCFSeat = import('@endo/pass-style').RemotableObject & {
157
+ export type ZCFSeatFail = (reason: unknown) => Error;
158
+ export type ZCFSeat = import('@endo/pass-style').RemotableObject & {
140
159
  exit: (completion?: Completion) => void;
141
160
  fail: ZCFSeatFail;
142
161
  getSubscriber: () => Promise<Subscriber<Allocation>>;
@@ -153,17 +172,17 @@ type ZCFSeat = import('@endo/pass-style').RemotableObject & {
153
172
  getCurrentAllocation: () => Allocation;
154
173
  isOfferSafe: (newAllocation: Allocation) => boolean;
155
174
  };
156
- type ZcfSeatKit = {
175
+ export type ZcfSeatKit = {
157
176
  zcfSeat: ZCFSeat;
158
177
  userSeat: Promise<UserSeat>;
159
178
  };
160
- type HandleOffer<OR, OA> = (seat: ZCFSeat, offerArgs: OA) => OR;
161
- type OfferHandler<OR = unknown, OA = never> =
179
+ export type HandleOffer<OR, OA> = (seat: ZCFSeat, offerArgs: OA) => OR;
180
+ export type OfferHandler<OR = unknown, OA = never> =
162
181
  | HandleOffer<OR, OA>
163
182
  | {
164
183
  handle: HandleOffer<OR, OA>;
165
184
  };
166
- type ContractMeta<
185
+ export type ContractMeta<
167
186
  SF extends // import inline to maintain ambient mode
168
187
  import('../zoeService/utils').ContractStartFunction = import('../zoeService/utils').ContractStartFunction,
169
188
  > = {
@@ -184,25 +203,25 @@ type ContractMeta<
184
203
  *
185
204
  * CAVEAT: assumes synchronous
186
205
  */
187
- type ContractStartFn<PF = any, CF = any, CT = any, PA = any> = (
206
+ export type ContractStartFn<PF = any, CF = any, CT = any, PA = any> = (
188
207
  zcf: ZCF<CT>,
189
208
  privateArgs: PA,
190
209
  baggage: import('@agoric/vat-data').Baggage,
191
210
  ) => ContractStartFnResult<PF, CF>;
192
- type ContractStartFnResult<PF, CF> = {
211
+ export type ContractStartFnResult<PF, CF> = {
193
212
  publicFacet?: PF;
194
213
  creatorFacet?: CF;
195
214
  creatorInvitation?: Promise<Invitation<any, any>> | undefined;
196
215
  };
197
216
 
198
217
  // XXX redef, losing documentation
199
- type ContractOf<S extends (...args: any) => any> =
218
+ export type ContractOf<S extends (...args: any) => any> =
200
219
  import('../zoeService/utils').ContractOf<S>;
201
- type AdminFacet = import('../zoeService/utils').AdminFacet<any>;
220
+ export type AdminFacet = import('../zoeService/utils').AdminFacet<any>;
202
221
 
203
222
  declare const OfferReturn: unique symbol;
204
223
  declare const OfferArgs: unique symbol;
205
- type Invitation<R = unknown, A = undefined> = Payment<
224
+ export type Invitation<R = unknown, A = undefined> = Payment<
206
225
  'set',
207
226
  InvitationDetails
208
227
  > & {
@@ -1,14 +1,20 @@
1
1
  /**
2
- * @param {VatPowers & { testJigSetter: TestJigSetter }} powers
2
+ * @import {ZoeService} from '@agoric/zoe';
3
+ */
4
+ /**
5
+ * @param {VatPowers & { testJigSetter: ( {zcf}: {zcf: ZCF} ) => void }} powers
3
6
  * @param {{contractBundleCap: BundleCap, zoeService: ZoeService, invitationIssuer: Issuer<'set'>, privateArgs?: any}} vatParameters
4
7
  * @param {import('@agoric/vat-data').Baggage} baggage
5
8
  */
6
9
  export function buildRootObject(powers: VatPowers & {
7
- testJigSetter: TestJigSetter;
10
+ testJigSetter: ({ zcf }: {
11
+ zcf: ZCF;
12
+ }) => void;
8
13
  }, vatParameters: {
9
14
  contractBundleCap: BundleCap;
10
15
  zoeService: ZoeService;
11
16
  invitationIssuer: Issuer<"set">;
12
17
  privateArgs?: any;
13
18
  }, baggage: import("@agoric/vat-data").Baggage): Promise<import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {}>>;
19
+ import type { ZoeService } from '@agoric/zoe';
14
20
  //# sourceMappingURL=vatRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vatRoot.d.ts","sourceRoot":"","sources":["vatRoot.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wCAJW,SAAS,GAAG;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,iBAC5C;IAAC,iBAAiB,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,WAC1G,OAAO,kBAAkB,EAAE,OAAO,oIA+D5C"}
1
+ {"version":3,"file":"vatRoot.d.ts","sourceRoot":"","sources":["vatRoot.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;;;;GAIG;AACH,wCAJW,SAAS,GAAG;IAAE,aAAa,EAAE,CAAE,EAAC,GAAG,EAAC,EAAE;QAAC,GAAG,EAAE,GAAG,CAAA;KAAC,KAAM,IAAI,CAAA;CAAE,iBAC5D;IAAC,iBAAiB,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,WAC1G,OAAO,kBAAkB,EAAE,OAAO,oIA8D5C;gCApE4B,aAAa"}
@@ -11,12 +11,14 @@ import { Fail } from '@endo/errors';
11
11
  import { Far } from '@endo/marshal';
12
12
  import { E } from '@endo/far';
13
13
 
14
- import '../internal-types.js';
15
-
16
14
  import { makeZCFZygote } from './zcfZygote.js';
17
15
 
18
16
  /**
19
- * @param {VatPowers & { testJigSetter: TestJigSetter }} powers
17
+ * @import {ZoeService} from '@agoric/zoe';
18
+ */
19
+
20
+ /**
21
+ * @param {VatPowers & { testJigSetter: ( {zcf}: {zcf: ZCF} ) => void }} powers
20
22
  * @param {{contractBundleCap: BundleCap, zoeService: ZoeService, invitationIssuer: Issuer<'set'>, privateArgs?: any}} vatParameters
21
23
  * @param {import('@agoric/vat-data').Baggage} baggage
22
24
  */
@@ -72,7 +74,6 @@ export async function buildRootObject(powers, vatParameters, baggage) {
72
74
  issuerStorageFromZoe,
73
75
  privateArgs = undefined,
74
76
  ) => {
75
- /** @type {ZCFZygote} */
76
77
  return E(zcfZygote).startContract(
77
78
  zoeInstanceAdmin,
78
79
  instanceRecordFromZoe,
@@ -5,4 +5,5 @@ export function prepareZcMint(zcfBaggage: import("@agoric/vat-data").Baggage, re
5
5
  zcfSeat: any;
6
6
  userSeat: Promise<UserSeat>;
7
7
  }, reallocator: ZcfMintReallocator): (keyword: string, zoeMintP: ERef<ZoeMint<K>>) => Promise<ZCFMint<K>>;
8
+ import type { ZCFMint } from '@agoric/zoe';
8
9
  //# sourceMappingURL=zcfMint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zcfMint.d.ts","sourceRoot":"","sources":["zcfMint.js"],"names":[],"mappings":"AAmBO,4CAJI,mBAAmB,gBACnB,YAAY,GACV,MAAM,CAYlB;AASM,0CANI,OAAO,kBAAkB,EAAE,OAAO,gBAClC;IAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,uBACvD,mBAAmB,oBACnB,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,eACnE,kBAAkB,IA0Gb,SAJH,MAIU,EAAE,UAHZ,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAGK,KAFlB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAWjC"}
1
+ {"version":3,"file":"zcfMint.d.ts","sourceRoot":"","sources":["zcfMint.js"],"names":[],"mappings":"AAqBO,4CAJI,mBAAmB,gBACnB,YAAY,GACV,MAAM,CAYlB;AASM,0CANI,OAAO,kBAAkB,EAAE,OAAO,gBAClC;IAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,uBACvD,mBAAmB,oBACnB,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,eACnE,kBAAkB,IA0Gb,SAJH,MAIU,EAAE,UAHZ,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAGK,KAFlB,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAWjC;6BA5I8G,aAAa"}
@@ -9,8 +9,10 @@ import { addToAllocation, subtractFromAllocation } from './allocationMath.js';
9
9
 
10
10
  import '../internal-types.js';
11
11
  import { ZcfMintI } from './typeGuards.js';
12
- import './internal-types.js';
13
- import './types-ambient.js';
12
+
13
+ /**
14
+ * @import {ContractMeta, ContractStartFn, Invitation, OfferHandler, TransferPart, ZCF, ZCFMint, ZCFSeat} from '@agoric/zoe';
15
+ */
14
16
 
15
17
  /**
16
18
  * @param {AmountKeywordRecord} amr
@@ -1 +1 @@
1
- {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAqCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,OAAO,sBAAsB,EAAE,mBAAmB,cAClD,OAAO,kBAAkB,EAAE,OAAO,GAChC;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAuTnF"}
1
+ {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAsCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,OAAO,sBAAsB,EAAE,mBAAmB,cAClD,OAAO,kBAAkB,EAAE,OAAO,GAChC;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAuTnF"}
@@ -23,6 +23,7 @@ import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
23
23
  /**
24
24
  * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
25
25
  * @import {MapStore} from '@agoric/swingset-liveslots';
26
+ * @import {ContractMeta, Invitation, OfferHandler, TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
26
27
  */
27
28
 
28
29
  /**
@@ -1,2 +1,10 @@
1
- export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter: TestJigSetter, contractBundleCap: BundleCap, zcfBaggage?: import("@agoric/vat-data").Baggage): Promise<ZCFZygote>;
1
+ export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter: ({ zcf }: {
2
+ zcf: ZCF;
3
+ }) => void, contractBundleCap: BundleCap, zcfBaggage?: import("@agoric/vat-data").Baggage): Promise<ZCFZygote>;
4
+ export type ZCFZygote = {
5
+ startContract: (instanceAdminFromZoe: ERef<ZoeInstanceAdmin>, instanceRecordFromZoe: InstanceRecord, issuerStorageFromZoe: IssuerRecords, privateArgs?: object) => Promise<ExecuteContractResult>;
6
+ restartContract: (privateArgs?: object) => void;
7
+ };
8
+ import type { ZoeService } from '@agoric/zoe';
9
+ import type { ZCF } from '@agoric/zoe';
2
10
  //# sourceMappingURL=zcfZygote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AAiDO,sCARI,SAAS,cACT,IAAI,CAAC,UAAU,CAAC,oBAChB,MAAM,CAAC,KAAK,CAAC,iBACb,aAAa,qBACb,SAAS,eACT,OAAO,kBAAkB,EAAE,OAAO,GAChC,OAAO,CAAC,SAAS,CAAC,CAod9B"}
1
+ {"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AA6DO,sCARI,SAAS,cACT,IAAI,CAAC,UAAU,CAAC,oBAChB,MAAM,CAAC,KAAK,CAAC,iBACb,CAAE,EAAC,GAAG,EAAC,EAAE;IAAC,GAAG,EAAE,GAAG,CAAA;CAAC,KAAM,IAAI,qBAC7B,SAAS,eACT,OAAO,kBAAkB,EAAE,OAAO,GAChC,OAAO,CAAC,SAAS,CAAC,CAod9B;;mBAvea,CAAC,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,CAAC,EACpD,qBAAqB,EAAE,cAAc,EACrC,oBAAoB,EAAE,aAAa,EACnC,WAAW,CAAC,EAAE,MAAM,KACnB,OAAO,CAAC,qBAAqB,CAAC;qBACxB,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI;;gCAVsG,aAAa;yBAAb,aAAa"}
@@ -30,9 +30,21 @@ import { prepareZcMint } from './zcfMint.js';
30
30
  import { ZcfI } from './typeGuards.js';
31
31
 
32
32
  /// <reference path="../internal-types.js" />
33
- /// <reference path="./internal-types.js" />
34
33
 
35
- /** @import {IssuerOptionsRecord} from '@agoric/ertp' */
34
+ /**
35
+ * @import {IssuerOptionsRecord} from '@agoric/ertp';
36
+ * @import {ContractMeta, ContractStartFn, Invitation, OfferHandler, SetTestJig, TransferPart, ZCF, ZCFMint, ZCFRegisterFeeMint, ZoeService} from '@agoric/zoe';
37
+ */
38
+
39
+ /**
40
+ * @typedef ZCFZygote
41
+ * @property {(instanceAdminFromZoe: ERef<ZoeInstanceAdmin>,
42
+ * instanceRecordFromZoe: InstanceRecord,
43
+ * issuerStorageFromZoe: IssuerRecords,
44
+ * privateArgs?: object,
45
+ * ) => Promise<ExecuteContractResult>} startContract
46
+ * @property {(privateArgs?: object) => void} restartContract
47
+ */
36
48
 
37
49
  /**
38
50
  * Make the ZCF vat in zygote-usable form. First, a generic ZCF is
@@ -42,7 +54,7 @@ import { ZcfI } from './typeGuards.js';
42
54
  * @param {VatPowers} powers
43
55
  * @param {ERef<ZoeService>} zoeService
44
56
  * @param {Issuer<'set'>} invitationIssuer
45
- * @param {TestJigSetter} testJigSetter
57
+ * @param {( {zcf}: {zcf: ZCF} ) => void} testJigSetter
46
58
  * @param {BundleCap} contractBundleCap
47
59
  * @param {import('@agoric/vat-data').Baggage} zcfBaggage
48
60
  * @returns {Promise<ZCFZygote>}
@@ -1,6 +1,12 @@
1
+ /**
2
+ * @import {ContractMeta, Invitation, OfferHandler, TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
3
+ */
1
4
  export const TransferPartShape: import("@endo/patterns").Matcher;
2
5
  export function atomicRearrange(zcf: ZCF, transfers: TransferPart[]): void;
3
6
  export function fromOnly(fromSeat: ZCFSeat, fromAmounts: AmountKeywordRecord): TransferPart;
4
7
  export function toOnly(toSeat: ZCFSeat, toAmounts: AmountKeywordRecord): TransferPart;
5
8
  export function atomicTransfer(zcf: ZCF, fromSeat?: ZCFSeat, toSeat?: ZCFSeat, fromAmounts?: AmountKeywordRecord, toAmounts?: AmountKeywordRecord): void;
9
+ import type { ZCF } from '@agoric/zoe';
10
+ import type { TransferPart } from '@agoric/zoe';
11
+ import type { ZCFSeat } from '@agoric/zoe';
6
12
  //# sourceMappingURL=atomicTransfer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAGA,iEAGE;AAyCK,qCAHI,GAAG,aACH,YAAY,EAAE,QAIxB;AAcM,mCAJI,OAAO,eACP,mBAAmB,GACjB,YAAY,CAGmB;AAcrC,+BAJI,OAAO,aACP,mBAAmB,GACjB,YAAY,CAG0B;AAW5C,oCANI,GAAG,aACH,OAAO,WACP,OAAO,gBACP,mBAAmB,cACnB,mBAAmB,QAQgD"}
1
+ {"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,iEAGE;AAyCK,qCAHI,GAAG,aACH,YAAY,EAAE,QAIxB;AAcM,mCAJI,OAAO,eACP,mBAAmB,GACjB,YAAY,CAGmB;AAcrC,+BAJI,OAAO,aACP,mBAAmB,GACjB,YAAY,CAG0B;AAW5C,oCANI,GAAG,aACH,OAAO,WACP,OAAO,gBACP,mBAAmB,cACnB,mBAAmB,QAQgD;yBAhGO,aAAa;kCAAb,aAAa;6BAAb,aAAa"}
@@ -1,6 +1,10 @@
1
1
  import { M } from '@agoric/store';
2
2
  import { AmountKeywordRecordShape, SeatShape } from '../typeGuards.js';
3
3
 
4
+ /**
5
+ * @import {ContractMeta, Invitation, OfferHandler, TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
6
+ */
7
+
4
8
  export const TransferPartShape = M.splitArray(
5
9
  harden([M.opt(SeatShape), M.opt(SeatShape), M.opt(AmountKeywordRecordShape)]),
6
10
  harden([M.opt(AmountKeywordRecordShape)]),
@@ -1,4 +1,6 @@
1
1
  export function makeInitialTransform(priceOutPerIn: Ratio, priceAuthority: PriceAuthority, quoteMint: ERef<Mint<"set", PriceDescription>>, brandIn: Brand<"nat">, brandOut: Brand<"nat">): PriceAuthority;
2
2
  import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
3
3
  import type { PriceDescription } from '@agoric/zoe/tools/types.js';
4
+ import type { Mint } from '@agoric/ertp';
5
+ import type { Brand } from '@agoric/ertp';
4
6
  //# sourceMappingURL=priceAuthorityInitial.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA6BO,oDAPI,KAAK,kBACL,cAAc,aACd,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,WACnC,KAAK,CAAC,KAAK,CAAC,YACZ,KAAK,CAAC,KAAK,CAAC,GACV,cAAc,CAyF1B;oCAvG4F,4BAA4B;sCAA5B,4BAA4B"}
1
+ {"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA8BO,oDAPI,KAAK,kBACL,cAAc,aACd,IAAI,CAAC,KAAK,KAAK,EAAE,gBAAgB,CAAC,CAAC,WACnC,MAAM,KAAK,CAAC,YACZ,MAAM,KAAK,CAAC,GACV,cAAc,CAyF1B;oCAvG4F,4BAA4B;sCAA5B,4BAA4B;0BADnF,cAAc;2BAAd,cAAc"}
@@ -11,6 +11,7 @@ import { multiplyBy } from './ratio.js';
11
11
  import { mintQuote } from './priceAuthorityTransform.js';
12
12
 
13
13
  /**
14
+ * @import {Amount, Brand, Mint} from '@agoric/ertp';
14
15
  * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
15
16
  */
16
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";UAMc,OAAO;;;;;WACP,mBAAmB;;;;;;;;YAEnB,mBAAmB;;;;;;;;;;;;;;;kBAqBtB,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;;;;;;;uBAcR,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;4BAIN,MAAM,CAAC,OAAO,EAAC,OAAO,CAAC;;;;;;qEAYvB,oBAAoB;;;;;;;mCAWtB,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,SAAS,kBAC7E,oBAAoB;;eAKjB,MAAM,CAAC,KAAK,CAAC;iBACb,MAAM,CAAC,KAAK,CAAC;;4BAKhB,MAAM,CAAC,KAAK,CAAC,SACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";UAOc,OAAO;;;;;WACP,mBAAmB;;;;;;;;YAEnB,mBAAmB;;;;;;;;;;;;;;;kBAqBtB,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;;;;;;;uBAcR,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;4BAIN,MAAM,CAAC,OAAO,EAAC,OAAO,CAAC;;;;;;qEAYvB,oBAAoB;;;;;;;mCAWtB,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,SAAS,kBAC7E,oBAAoB;;eAKjB,MAAM,CAAC,KAAK,CAAC;iBACb,MAAM,CAAC,KAAK,CAAC;;4BAKhB,MAAM,CAAC,KAAK,CAAC,SACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC"}