@agoric/zoe 0.26.3-dev-5eb596e.0 → 0.26.3-dev-cc54325.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 (36) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +88 -80
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +11 -10
  4. package/src/contractFacet/reallocate.d.ts +3 -0
  5. package/src/contractFacet/reallocate.d.ts.map +1 -0
  6. package/src/contractFacet/reallocate.js +94 -0
  7. package/src/contractFacet/types.d.ts +10 -0
  8. package/src/contractFacet/types.d.ts.map +1 -1
  9. package/src/contractFacet/types.js +12 -0
  10. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  11. package/src/contractFacet/zcfSeat.js +104 -3
  12. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  13. package/src/contractFacet/zcfZygote.js +1 -0
  14. package/src/contractSupport/atomicTransfer.d.ts +0 -6
  15. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  16. package/src/contractSupport/atomicTransfer.js +5 -90
  17. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  18. package/src/contractSupport/zoeHelpers.js +3 -10
  19. package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -1
  20. package/src/contracts/auction/firstPriceLogic.js +1 -3
  21. package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -1
  22. package/src/contracts/auction/secondPriceLogic.js +1 -3
  23. package/src/contracts/autoswap.d.ts.map +1 -1
  24. package/src/contracts/autoswap.js +3 -7
  25. package/src/contracts/barterExchange.d.ts.map +1 -1
  26. package/src/contracts/barterExchange.js +2 -3
  27. package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -1
  28. package/src/contracts/callSpread/fundedCallSpread.js +1 -3
  29. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
  30. package/src/contracts/callSpread/pricedCallSpread.js +1 -3
  31. package/src/contracts/loan/borrow.d.ts.map +1 -1
  32. package/src/contracts/loan/borrow.js +1 -3
  33. package/src/contracts/loan/close.d.ts.map +1 -1
  34. package/src/contracts/loan/close.js +2 -6
  35. package/src/contracts/sellItems.d.ts.map +1 -1
  36. package/src/contracts/sellItems.js +1 -3
@@ -1,7 +1,7 @@
1
1
  import { Far } from '@endo/marshal';
2
2
  import { makeLegacyMap } from '@agoric/store';
3
3
  // Eventually will be importable from '@agoric/zoe-contract-support'
4
- import { satisfies, atomicRearrange } from '../contractSupport/index.js';
4
+ import { satisfies } from '../contractSupport/index.js';
5
5
 
6
6
  /**
7
7
  * This Barter Exchange accepts offers to trade arbitrary goods for other
@@ -63,8 +63,7 @@ const start = zcf => {
63
63
  const matchingTrade = findMatchingTrade(offerDetails, orders);
64
64
  if (matchingTrade) {
65
65
  // reallocate by giving each side what it wants
66
- atomicRearrange(
67
- zcf,
66
+ zcf.atomicRearrange(
68
67
  harden([
69
68
  [
70
69
  offerDetails.seat,
@@ -1 +1 @@
1
- {"version":3,"file":"fundedCallSpread.d.ts","sourceRoot":"","sources":["fundedCallSpread.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH;kBARiB,MAAM;kBACN,MAAM;sBACF,MAAM;oBACR,cAAc;gBAClB,MAAM;sBACA,MAAM;;;GA+E1B"}
1
+ {"version":3,"file":"fundedCallSpread.d.ts","sourceRoot":"","sources":["fundedCallSpread.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH;kBARiB,MAAM;kBACN,MAAM;sBACF,MAAM;oBACR,cAAc;gBAClB,MAAM;sBACA,MAAM;;;GA8E1B"}
@@ -7,7 +7,6 @@ import {
7
7
  assertProposalShape,
8
8
  depositToSeat,
9
9
  assertNatAssetKind,
10
- atomicRearrange,
11
10
  } from '../../contractSupport/index.js';
12
11
  import { makePayoffHandler } from './payoffHandler.js';
13
12
  import { Position } from './position.js';
@@ -112,8 +111,7 @@ const start = async zcf => {
112
111
  give: { Collateral: null },
113
112
  want: { LongOption: null, ShortOption: null },
114
113
  });
115
- atomicRearrange(
116
- zcf,
114
+ zcf.atomicRearrange(
117
115
  harden([
118
116
  [creatorSeat, collateralSeat, { Collateral: settlementAmount }],
119
117
  [
@@ -1 +1 @@
1
- {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,OAAO,KAAK,CAAC;kBACb,OAAO,KAAK,CAAC;sBACT,OAAO,KAAK,CAAC;oBACf,cAAc;gBAClB,MAAM;sBACA,OAAO,KAAK,CAAC;;;;;;;;;;;;;EA2GjC"}
1
+ {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,OAAO,KAAK,CAAC;kBACb,OAAO,KAAK,CAAC;sBACT,OAAO,KAAK,CAAC;oBACf,cAAc;gBAClB,MAAM;sBACA,OAAO,KAAK,CAAC;;;;;;;;;;;;;EA0GjC"}
@@ -10,7 +10,6 @@ import {
10
10
  assertNatAssetKind,
11
11
  makeRatio,
12
12
  ceilMultiplyBy,
13
- atomicRearrange,
14
13
  } from '../../contractSupport/index.js';
15
14
  import { makePayoffHandler } from './payoffHandler.js';
16
15
  import { Position } from './position.js';
@@ -132,8 +131,7 @@ const start = zcf => {
132
131
  'wanted option not a match',
133
132
  );
134
133
 
135
- atomicRearrange(
136
- zcf,
134
+ zcf.atomicRearrange(
137
135
  harden([
138
136
  [collateralSeat, depositSeat, spreadAmount],
139
137
  [depositSeat, collateralSeat, { Collateral: newCollateral }],
@@ -1 +1 @@
1
- {"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAmBA,mCAAmC;AACnC,mCADW,oBAAoB,CAkI7B"}
1
+ {"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAkBA,mCAAmC;AACnC,mCADW,oBAAoB,CAiI7B"}
@@ -9,7 +9,6 @@ import {
9
9
  getAmountOut,
10
10
  ceilMultiplyBy,
11
11
  getTimestamp,
12
- atomicRearrange,
13
12
  } from '../../contractSupport/index.js';
14
13
 
15
14
  import { scheduleLiquidation } from './scheduleLiquidation.js';
@@ -72,8 +71,7 @@ export const makeBorrowInvitation = (zcf, config) => {
72
71
 
73
72
  const { zcfSeat: collateralSeat } = zcf.makeEmptySeatKit();
74
73
 
75
- atomicRearrange(
76
- zcf,
74
+ zcf.atomicRearrange(
77
75
  harden([
78
76
  // Transfer the wanted Loan amount to the borrower
79
77
  [lenderSeat, borrowerSeat, { Loan: loanWanted }],
@@ -1 +1 @@
1
- {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["close.js"],"names":[],"mappings":"AAeA,sCAAsC;AACtC,sCADW,uBAAuB,CAkDhC"}
1
+ {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["close.js"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,sCADW,uBAAuB,CAiDhC"}
@@ -3,10 +3,7 @@ import './types.js';
3
3
  import { Fail } from '@agoric/assert';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
 
6
- import {
7
- assertProposalShape,
8
- atomicRearrange,
9
- } from '../../contractSupport/index.js';
6
+ import { assertProposalShape } from '../../contractSupport/index.js';
10
7
 
11
8
  // The debt, the amount which must be repaid, is just the amount
12
9
  // loaned plus interest (aka stability fee). All debt must be repaid
@@ -44,8 +41,7 @@ export const makeCloseLoanInvitation = (zcf, config) => {
44
41
  'Collateral',
45
42
  collateralBrand,
46
43
  );
47
- atomicRearrange(
48
- zcf,
44
+ zcf.atomicRearrange(
49
45
  harden([
50
46
  [collateralSeat, repaySeat, { Collateral: collateralAmount }],
51
47
  [repaySeat, lenderSeat, { Loan: debt }],
@@ -1 +1 @@
1
- {"version":3,"file":"sellItems.d.ts","sourceRoot":"","sources":["sellItems.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;kBAF8B,OAAO,KAAK,CAAC;;;;;EAwH1C"}
1
+ {"version":3,"file":"sellItems.d.ts","sourceRoot":"","sources":["sellItems.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;kBAF8B,OAAO,KAAK,CAAC;;;;;EAuH1C"}
@@ -11,7 +11,6 @@ import {
11
11
  defaultAcceptanceMsg,
12
12
  assertProposalShape,
13
13
  assertNatAssetKind,
14
- atomicRearrange,
15
14
  } from '../contractSupport/index.js';
16
15
 
17
16
  const { Fail } = assert;
@@ -107,8 +106,7 @@ const start = zcf => {
107
106
  Fail`More money (${totalCost}) is required to buy these items`;
108
107
 
109
108
  // Reallocate.
110
- atomicRearrange(
111
- zcf,
109
+ zcf.atomicRearrange(
112
110
  harden([
113
111
  [buyerSeat, sellerSeat, { Money: providedMoney }],
114
112
  [sellerSeat, buyerSeat, { Items: wantedItems }],