@agoric/inter-protocol 0.16.2-dev-3c22e86.0 → 0.16.2-dev-b6b074d.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/inter-protocol",
3
- "version": "0.16.2-dev-3c22e86.0+3c22e86",
3
+ "version": "0.16.2-dev-b6b074d.0+b6b074d",
4
4
  "description": "Core cryptoeconomy contracts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -30,15 +30,15 @@
30
30
  },
31
31
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
32
32
  "dependencies": {
33
- "@agoric/assert": "0.6.1-dev-3c22e86.0+3c22e86",
34
- "@agoric/ertp": "0.16.3-dev-3c22e86.0+3c22e86",
35
- "@agoric/governance": "0.10.4-dev-3c22e86.0+3c22e86",
36
- "@agoric/internal": "0.3.3-dev-3c22e86.0+3c22e86",
37
- "@agoric/notifier": "0.6.3-dev-3c22e86.0+3c22e86",
38
- "@agoric/store": "0.9.3-dev-3c22e86.0+3c22e86",
39
- "@agoric/time": "0.3.3-dev-3c22e86.0+3c22e86",
40
- "@agoric/vat-data": "0.5.3-dev-3c22e86.0+3c22e86",
41
- "@agoric/zoe": "0.26.3-dev-3c22e86.0+3c22e86",
33
+ "@agoric/assert": "0.6.1-dev-b6b074d.0+b6b074d",
34
+ "@agoric/ertp": "0.16.3-dev-b6b074d.0+b6b074d",
35
+ "@agoric/governance": "0.10.4-dev-b6b074d.0+b6b074d",
36
+ "@agoric/internal": "0.3.3-dev-b6b074d.0+b6b074d",
37
+ "@agoric/notifier": "0.6.3-dev-b6b074d.0+b6b074d",
38
+ "@agoric/store": "0.9.3-dev-b6b074d.0+b6b074d",
39
+ "@agoric/time": "0.3.3-dev-b6b074d.0+b6b074d",
40
+ "@agoric/vat-data": "0.5.3-dev-b6b074d.0+b6b074d",
41
+ "@agoric/zoe": "0.26.3-dev-b6b074d.0+b6b074d",
42
42
  "@endo/captp": "^3.1.1",
43
43
  "@endo/eventual-send": "^0.17.2",
44
44
  "@endo/far": "^0.2.18",
@@ -47,12 +47,12 @@
47
47
  "jessie.js": "^0.3.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@agoric/deploy-script-support": "0.10.4-dev-3c22e86.0+3c22e86",
51
- "@agoric/smart-wallet": "0.5.4-dev-3c22e86.0+3c22e86",
52
- "@agoric/swingset-liveslots": "0.10.3-dev-3c22e86.0+3c22e86",
53
- "@agoric/swingset-vat": "0.32.3-dev-3c22e86.0+3c22e86",
54
- "@agoric/vats": "0.15.2-dev-3c22e86.0+3c22e86",
55
- "@agoric/zone": "0.2.3-dev-3c22e86.0+3c22e86",
50
+ "@agoric/deploy-script-support": "0.10.4-dev-b6b074d.0+b6b074d",
51
+ "@agoric/smart-wallet": "0.5.4-dev-b6b074d.0+b6b074d",
52
+ "@agoric/swingset-liveslots": "0.10.3-dev-b6b074d.0+b6b074d",
53
+ "@agoric/swingset-vat": "0.32.3-dev-b6b074d.0+b6b074d",
54
+ "@agoric/vats": "0.15.2-dev-b6b074d.0+b6b074d",
55
+ "@agoric/zone": "0.2.3-dev-b6b074d.0+b6b074d",
56
56
  "@endo/bundle-source": "^2.5.1",
57
57
  "@endo/init": "^0.5.56",
58
58
  "@endo/promise-kit": "^0.2.56",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "3c22e864350b333eb1bc0f5f5c64be0ff528a7e7"
82
+ "gitHead": "b6b074d1ab4d645e78f357043bf7c56aabfcaf38"
83
83
  }
@@ -9,8 +9,6 @@ import { parseRatio } from '@agoric/zoe/src/contractSupport/ratio.js';
9
9
  const COSMOS_UNIT = 1_000_000n;
10
10
  const scaleDecimals = num => BigInt(num * Number(COSMOS_UNIT));
11
11
 
12
- // TODO use '@satisfies" in TS 5.1 to make sure these each conform to OfferMaker interface
13
-
14
12
  // NB: not really a Proposal because the brands are not remotes
15
13
  // Instead they're copyRecord like "{"boardId":"board0257","iface":"Alleged: IST brand"}" to pass through the boardId
16
14
  // mustMatch(harden(proposal), ProposalShape);
@@ -143,11 +141,10 @@ export const lookupOfferIdForVault = async (vaultId, currentP) => {
143
141
  };
144
142
 
145
143
  /**
146
- * @param {Record<string, Brand>} brands
144
+ * @param {Record<string, import('@agoric/internal/src/marshal.js').BoardRemote>} brands
147
145
  * @param {({ wantMinted: number, giveMinted?: undefined } | { giveMinted: number, wantMinted?: undefined })} opts
148
- * @param {number} [fee=0]
146
+ * @param {number} [fee]
149
147
  * @param {string} [anchor]
150
- * @returns {Proposal} XXX not a real proposal, uses BoardRemote
151
148
  */
152
149
  const makePsmProposal = (brands, opts, fee = 0, anchor = 'AUSD') => {
153
150
  const giving = 'giveMinted' in opts ? 'minted' : 'anchor';
@@ -202,15 +199,13 @@ const makePsmSwapOffer = ({ brand }, instance, opts) => {
202
199
  instance,
203
200
  publicInvitationMaker: method,
204
201
  },
202
+ // @ts-expect-error BoardRemote not a Brand object
205
203
  proposal,
206
204
  };
207
205
  };
208
206
 
209
207
  /**
210
- * @param {{
211
- * brand: Record<string, Brand>,
212
- * vbankAsset: Record<string, { brand: Brand, displayInfo: DisplayInfo }>,
213
- * }} agoricNames
208
+ * @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand' | 'vbankAsset'>} agoricNames
214
209
  * @param {(msg: string) => Error} makeError error constructor
215
210
  * @returns {(a: string) => Amount<'nat'>}
216
211
  */
@@ -329,6 +324,7 @@ const makeAddCollateralOffer = ({ brand }, opts) => {
329
324
  /** @type {AmountKeywordRecord} */
330
325
  const give = {
331
326
  Collateral: AmountMath.make(
327
+ // @ts-expect-error BoardRemote not a Brand object
332
328
  brand[opts.collateralBrandKey],
333
329
  scaleDecimals(opts.give),
334
330
  ),
@@ -373,6 +369,9 @@ const makePushPriceOffer = (_agoricNames, opts, previousOffer) => {
373
369
  };
374
370
  };
375
371
 
372
+ /**
373
+ * @satisfies {Record<string, Record<string, import('@agoric/smart-wallet/src/types.js').OfferMaker>>}
374
+ */
376
375
  export const Offers = {
377
376
  auction: {
378
377
  Bid: makeBidOffer,