@agoric/zoe 0.27.0-u19.2 → 0.27.0-u21.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/bundles/bundle-contractFacet-js-meta.json +281 -281
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +36 -35
- package/src/cleanProposal.d.ts +2 -0
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +4 -2
- package/src/contractFacet/exit.d.ts +1 -1
- package/src/contractFacet/exit.d.ts.map +1 -1
- package/src/contractFacet/offerHandlerStorage.d.ts +1 -1
- package/src/contractFacet/rightsConservation.d.ts.map +1 -1
- package/src/contractFacet/rightsConservation.js +0 -1
- package/src/contractFacet/types.d.ts +184 -0
- package/src/contractFacet/types.d.ts.map +1 -0
- package/src/contractFacet/{types-ambient.d.ts → types.ts} +66 -29
- package/src/contractFacet/vatRoot.d.ts +9 -3
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/vatRoot.js +5 -4
- package/src/contractFacet/zcfMint.d.ts +3 -2
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +7 -7
- package/src/contractFacet/zcfSeat.d.ts +3 -1
- package/src/contractFacet/zcfSeat.d.ts.map +1 -1
- package/src/contractFacet/zcfSeat.js +6 -4
- package/src/contractFacet/zcfZygote.d.ts +8 -1
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +20 -8
- package/src/contractSupport/atomicTransfer.d.ts +6 -0
- package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
- package/src/contractSupport/atomicTransfer.js +4 -0
- package/src/contractSupport/bondingCurves.js +1 -1
- package/src/contractSupport/index.d.ts +2 -2
- package/src/contractSupport/index.js +2 -19
- package/src/contractSupport/prepare-ownable.d.ts +1 -1
- package/src/contractSupport/prepare-ownable.d.ts.map +1 -1
- package/src/contractSupport/prepare-ownable.js +5 -1
- package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +3 -1
- package/src/contractSupport/types-ambient.d.ts.map +1 -1
- package/src/contractSupport/types-ambient.js +1 -0
- package/src/contractSupport/zoeHelpers.d.ts +6 -1
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.js +1 -0
- package/src/contracts/atomicSwap.d.ts +1 -1
- package/src/contracts/auction/index.d.ts +5 -5
- package/src/contracts/automaticRefund.d.ts +4 -4
- package/src/contracts/autoswap.d.ts +4 -0
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +4 -0
- package/src/contracts/barterExchange.d.ts +3 -3
- package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +5 -5
- package/src/contracts/coveredCall-durable.d.ts +1 -1
- package/src/contracts/coveredCall.d.ts +1 -1
- package/src/contracts/loan/index.d.ts +1 -1
- package/src/contracts/loan/liquidate.d.ts.map +1 -1
- package/src/contracts/loan/liquidate.js +5 -1
- package/src/contracts/loan/types-ambient.d.ts +13 -13
- package/src/contracts/loan/types-ambient.d.ts.map +1 -1
- package/src/contracts/loan/types-ambient.js +17 -17
- package/src/contracts/mintPayments.d.ts +4 -4
- package/src/contracts/oracle.d.ts +5 -2
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +1 -0
- package/src/contracts/otcDesk.d.ts +1 -1
- package/src/contracts/priceAggregator.d.ts +4 -2
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +10 -8
- package/src/contracts/scaledPriceAuthority.d.ts +1 -0
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +1 -0
- package/src/contracts/sellItems.d.ts +1 -1
- package/src/contracts/simpleExchange.d.ts +6 -1
- package/src/contracts/simpleExchange.d.ts.map +1 -1
- package/src/contracts/simpleExchange.js +4 -0
- package/src/contracts/types-ambient.d.ts +7 -7
- package/src/contracts/types-ambient.d.ts.map +1 -1
- package/src/contracts/types-ambient.js +7 -7
- package/src/contracts/valueVow.contract.d.ts +5 -2
- package/src/contracts/valueVow.contract.d.ts.map +1 -1
- package/src/contracts/valueVow.contract.js +1 -0
- package/src/instanceRecordStorage.d.ts +3 -1
- package/src/instanceRecordStorage.d.ts.map +1 -1
- package/src/instanceRecordStorage.js +9 -2
- package/src/internal-types.d.ts +25 -10
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +21 -11
- package/src/issuerRecord.d.ts +3 -2
- package/src/issuerRecord.d.ts.map +1 -1
- package/src/issuerRecord.js +6 -2
- package/src/issuerStorage.d.ts +3 -2
- package/src/issuerStorage.d.ts.map +1 -1
- package/src/issuerStorage.js +6 -5
- package/src/typeGuards.d.ts +10 -6
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +7 -5
- package/src/types-ambient.d.ts +0 -40
- package/src/types-ambient.d.ts.map +1 -1
- package/src/types-ambient.js +4 -42
- package/src/types-index.d.ts +4 -0
- package/src/types-index.js +2 -0
- package/src/types.d.ts +29 -0
- package/src/types.d.ts.map +1 -0
- package/src/types.ts +37 -0
- package/src/zoeService/escrowStorage.d.ts.map +1 -1
- package/src/zoeService/escrowStorage.js +1 -2
- package/src/zoeService/feeMint.d.ts +6 -3
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/feeMint.js +8 -2
- package/src/zoeService/installationStorage.d.ts +3 -2
- package/src/zoeService/installationStorage.d.ts.map +1 -1
- package/src/zoeService/installationStorage.js +3 -7
- package/src/zoeService/internal-types.d.ts +11 -3
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +9 -3
- package/src/zoeService/invitationQueries.d.ts +3 -3
- package/src/zoeService/invitationQueries.js +3 -3
- package/src/zoeService/makeInvitation.d.ts +4 -1
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +8 -2
- package/src/zoeService/offer/offer.d.ts +1 -0
- package/src/zoeService/offer/offer.d.ts.map +1 -1
- package/src/zoeService/offer/offer.js +3 -1
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +0 -2
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +2 -4
- package/src/zoeService/types-ambient.d.ts +0 -226
- package/src/zoeService/types-ambient.d.ts.map +1 -1
- package/src/zoeService/types-ambient.js +4 -327
- package/src/zoeService/types.d.ts +238 -0
- package/src/zoeService/types.d.ts.map +1 -0
- package/src/zoeService/types.ts +307 -0
- package/src/zoeService/utils.d.ts +13 -5
- package/src/zoeService/utils.test-d.ts +1 -0
- package/src/zoeService/zoe.d.ts +18 -7
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +12 -5
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +1 -2
- package/src/zoeService/zoeStorageManager.d.ts +6 -6
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +13 -4
- package/tools/fakeVatAdmin.d.ts +15 -8
- package/tools/fakeVatAdmin.d.ts.map +1 -1
- package/tools/fakeVatAdmin.js +18 -10
- package/tools/manualPriceAuthority.d.ts +4 -1
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +1 -0
- package/tools/scriptedOracle.d.ts +7 -3
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +4 -0
- package/tools/setup-zoe.d.ts +13 -7
- package/tools/setup-zoe.d.ts.map +1 -1
- package/tools/setup-zoe.js +38 -5
- package/tools/test-utils.d.ts +1 -1
- package/tools/test-utils.js +1 -1
- package/tools/types.d.ts +1 -0
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +1 -0
- package/src/contractFacet/internal-types.d.ts +0 -8
- package/src/contractFacet/internal-types.d.ts.map +0 -1
- package/src/contractFacet/internal-types.js +0 -15
- package/src/contractFacet/types-ambient.js +0 -1
- package/src/contractSupport/ratio.d.ts +0 -37
- package/src/contractSupport/ratio.d.ts.map +0 -1
- package/src/contractSupport/ratio.js +0 -419
- package/src/contractSupport/safeMath.d.ts +0 -11
- package/src/contractSupport/safeMath.d.ts.map +0 -1
- package/src/contractSupport/safeMath.js +0 -49
|
@@ -6,15 +6,15 @@ import { prepareExoClass } from '@agoric/vat-data';
|
|
|
6
6
|
import { coerceAmountKeywordRecord } from '../cleanProposal.js';
|
|
7
7
|
import { assertFullIssuerRecord, makeIssuerRecord } from '../issuerRecord.js';
|
|
8
8
|
import { addToAllocation, subtractFromAllocation } from './allocationMath.js';
|
|
9
|
-
|
|
10
|
-
import '../internal-types.js';
|
|
11
9
|
import { ZcfMintI } from './typeGuards.js';
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @import {ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
13
|
+
*/
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @param {AmountKeywordRecord} amr
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {ZoeIssuerRecord} issuerRecord
|
|
18
18
|
* @returns {Amount}
|
|
19
19
|
*/
|
|
20
20
|
export const sumAmountKeywordRecord = (amr, issuerRecord) => {
|
|
@@ -31,7 +31,7 @@ export const sumAmountKeywordRecord = (amr, issuerRecord) => {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @param {import('@agoric/vat-data').Baggage} zcfBaggage
|
|
34
|
-
* @param {{ (keyword: string, issuerRecord:
|
|
34
|
+
* @param {{ (keyword: string, issuerRecord: ZoeIssuerRecord): void }} recordIssuer
|
|
35
35
|
* @param {GetAssetKindByBrand} getAssetKindByBrand
|
|
36
36
|
* @param {(exit?: undefined) => { zcfSeat: any; userSeat: Promise<UserSeat> }} makeEmptySeatKit
|
|
37
37
|
* @param {ZcfMintReallocator} reallocator
|
|
@@ -51,7 +51,7 @@ export const prepareZcMint = (
|
|
|
51
51
|
* @template {AssetKind} [K=AssetKind]
|
|
52
52
|
* @param {string} keyword
|
|
53
53
|
* @param {ZoeMint<K>} zoeMint
|
|
54
|
-
* @param {Required<
|
|
54
|
+
* @param {Required<ZoeIssuerRecord<K>>} issuerRecord
|
|
55
55
|
*/
|
|
56
56
|
(keyword, zoeMint, issuerRecord) => {
|
|
57
57
|
const {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export function createSeatManager(zoeInstanceAdmin: ERef<ZoeInstanceAdmin>, getAssetKindByBrand: GetAssetKindByBrand, shutdownWithFailure:
|
|
1
|
+
export function createSeatManager(zoeInstanceAdmin: ERef<ZoeInstanceAdmin>, getAssetKindByBrand: GetAssetKindByBrand, shutdownWithFailure: ShutdownWithFailure, zcfBaggage: Baggage): {
|
|
2
2
|
seatManager: ZcfSeatManager;
|
|
3
3
|
zcfMintReallocator: ZcfMintReallocator;
|
|
4
4
|
};
|
|
5
|
+
import type { ShutdownWithFailure } from '@agoric/swingset-vat';
|
|
6
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
5
7
|
//# sourceMappingURL=zcfSeat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAuCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,mBAAmB,cACnB,OAAO,GACL;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAuTnF;yCApUqC,sBAAsB;6BAClC,kBAAkB"}
|
|
@@ -21,8 +21,10 @@ import { makeAllocationMap } from './reallocate.js';
|
|
|
21
21
|
import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* @import {
|
|
25
|
-
* @import {
|
|
24
|
+
* @import {WeakMapStore} from '@agoric/store';
|
|
25
|
+
* @import {ShutdownWithFailure} from '@agoric/swingset-vat';
|
|
26
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
27
|
+
* @import {Allocation} from './types.js';
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -31,8 +33,8 @@ import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
|
|
|
31
33
|
*
|
|
32
34
|
* @param {ERef<ZoeInstanceAdmin>} zoeInstanceAdmin
|
|
33
35
|
* @param {GetAssetKindByBrand} getAssetKindByBrand
|
|
34
|
-
* @param {
|
|
35
|
-
* @param {
|
|
36
|
+
* @param {ShutdownWithFailure} shutdownWithFailure
|
|
37
|
+
* @param {Baggage} zcfBaggage
|
|
36
38
|
* @returns {{ seatManager: ZcfSeatManager, zcfMintReallocator: ZcfMintReallocator }}
|
|
37
39
|
*/
|
|
38
40
|
export const createSeatManager = (
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter:
|
|
1
|
+
export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter: ({ zcf }: {
|
|
2
|
+
zcf: ZCF;
|
|
3
|
+
}) => void, contractBundleCap: BundleCap, zcfBaggage?: 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 { Baggage } from '@agoric/vat-data';
|
|
2
9
|
//# sourceMappingURL=zcfZygote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"
|
|
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,GACL,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;;6BAZlB,kBAAkB"}
|
|
@@ -29,10 +29,22 @@ import { HandleOfferI, InvitationHandleShape } from '../typeGuards.js';
|
|
|
29
29
|
import { prepareZcMint } from './zcfMint.js';
|
|
30
30
|
import { ZcfI } from './typeGuards.js';
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @import {ShutdownWithFailure} from '@agoric/swingset-vat';
|
|
34
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
35
|
+
* @import {IssuerOptionsRecord} from '@agoric/ertp';
|
|
36
|
+
* @import {ZoeIssuerRecord, ZCFRegisterFeeMint, ContractStartFn, SetTestJig} from './types.js';
|
|
37
|
+
*/
|
|
34
38
|
|
|
35
|
-
/**
|
|
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,9 +54,9 @@ import { ZcfI } from './typeGuards.js';
|
|
|
42
54
|
* @param {VatPowers} powers
|
|
43
55
|
* @param {ERef<ZoeService>} zoeService
|
|
44
56
|
* @param {Issuer<'set'>} invitationIssuer
|
|
45
|
-
* @param {
|
|
57
|
+
* @param {( {zcf}: {zcf: ZCF} ) => void} testJigSetter
|
|
46
58
|
* @param {BundleCap} contractBundleCap
|
|
47
|
-
* @param {
|
|
59
|
+
* @param {Baggage} zcfBaggage
|
|
48
60
|
* @returns {Promise<ZCFZygote>}
|
|
49
61
|
*/
|
|
50
62
|
export const makeZCFZygote = async (
|
|
@@ -76,7 +88,7 @@ export const makeZCFZygote = async (
|
|
|
76
88
|
instantiate: instantiateIssuerStorage,
|
|
77
89
|
} = provideIssuerStorage(zcfBaggage);
|
|
78
90
|
|
|
79
|
-
/** @type {
|
|
91
|
+
/** @type {ShutdownWithFailure} */
|
|
80
92
|
const shutdownWithFailure = reason => {
|
|
81
93
|
void E(zoeInstanceAdmin).failAllSeats(reason);
|
|
82
94
|
seatManager.dropAllReferences();
|
|
@@ -92,7 +104,7 @@ export const makeZCFZygote = async (
|
|
|
92
104
|
|
|
93
105
|
/**
|
|
94
106
|
* @param {string} keyword
|
|
95
|
-
* @param {
|
|
107
|
+
* @param {ZoeIssuerRecord} issuerRecord
|
|
96
108
|
*/
|
|
97
109
|
const recordIssuer = (keyword, issuerRecord) => {
|
|
98
110
|
getInstanceRecHolder().addIssuer(keyword, issuerRecord);
|
|
@@ -238,7 +250,7 @@ export const makeZCFZygote = async (
|
|
|
238
250
|
} else {
|
|
239
251
|
bundle = contractBundleCap;
|
|
240
252
|
}
|
|
241
|
-
return evalContractBundle(bundle);
|
|
253
|
+
return /** @type {any} */ (evalContractBundle(bundle));
|
|
242
254
|
};
|
|
243
255
|
// evaluate the contract (either the first version, or an upgrade)
|
|
244
256
|
const bundleResult = await evaluateContract();
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {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;yBAhGjC,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 {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,5 +1,6 @@
|
|
|
1
|
-
export { natSafeMath } from "
|
|
1
|
+
export { natSafeMath } from "@agoric/ertp/src/safeMath.js";
|
|
2
2
|
export { makeStateMachine } from "./stateMachine.js";
|
|
3
|
+
export * from "@agoric/ertp/src/ratio.js";
|
|
3
4
|
export * from "./durability.js";
|
|
4
5
|
export * from "./prepare-ownable.js";
|
|
5
6
|
export * from "./priceAuthority.js";
|
|
@@ -10,5 +11,4 @@ export * from "./topics.js";
|
|
|
10
11
|
export { getInputPrice, getOutputPrice, calcLiqValueToMint, calcValueToRemove, calcSecondaryRequired } from "./bondingCurves.js";
|
|
11
12
|
export { atomicRearrange, atomicTransfer, fromOnly, toOnly } from "./atomicTransfer.js";
|
|
12
13
|
export { defaultAcceptanceMsg, swap, fitProposalShape, assertProposalShape, assertIssuerKeywords, satisfies, assertNatAssetKind, swapExact, depositToSeat, withdrawFromSeat, saveAllIssuers, offerTo } from "./zoeHelpers.js";
|
|
13
|
-
export { makeRatio, makeRatioFromAmounts, floorMultiplyBy, floorDivideBy, ceilMultiplyBy, ceilDivideBy, assertIsRatio, invertRatio, oneMinus, addRatios, multiplyRatios, ratiosSame, quantize, ratioGTE, subtractRatios, ratioToNumber } from "./ratio.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -8,7 +8,7 @@ export {
|
|
|
8
8
|
calcSecondaryRequired,
|
|
9
9
|
} from './bondingCurves.js';
|
|
10
10
|
|
|
11
|
-
export { natSafeMath } from '
|
|
11
|
+
export { natSafeMath } from '@agoric/ertp/src/safeMath.js';
|
|
12
12
|
|
|
13
13
|
export { makeStateMachine } from './stateMachine.js';
|
|
14
14
|
|
|
@@ -34,24 +34,7 @@ export {
|
|
|
34
34
|
offerTo,
|
|
35
35
|
} from './zoeHelpers.js';
|
|
36
36
|
|
|
37
|
-
export
|
|
38
|
-
makeRatio,
|
|
39
|
-
makeRatioFromAmounts,
|
|
40
|
-
floorMultiplyBy,
|
|
41
|
-
floorDivideBy,
|
|
42
|
-
ceilMultiplyBy,
|
|
43
|
-
ceilDivideBy,
|
|
44
|
-
assertIsRatio,
|
|
45
|
-
invertRatio,
|
|
46
|
-
oneMinus,
|
|
47
|
-
addRatios,
|
|
48
|
-
multiplyRatios,
|
|
49
|
-
ratiosSame,
|
|
50
|
-
quantize,
|
|
51
|
-
ratioGTE,
|
|
52
|
-
subtractRatios,
|
|
53
|
-
ratioToNumber,
|
|
54
|
-
} from './ratio.js';
|
|
37
|
+
export * from '@agoric/ertp/src/ratio.js';
|
|
55
38
|
|
|
56
39
|
export * from './durability.js';
|
|
57
40
|
export * from './prepare-ownable.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareOwnable<MN extends (string | symbol)[]>(zone: import("@agoric/base-zone").Zone, makeInvitation: ZCF["makeInvitation"], uKindName: string, uMethodNames: MN, options?: OwnableOptions): <U>(underlying: U) =>
|
|
1
|
+
export function prepareOwnable<MN extends (string | symbol)[]>(zone: import("@agoric/base-zone").Zone, makeInvitation: ZCF["makeInvitation"], uKindName: string, uMethodNames: MN, options?: OwnableOptions): <U>(underlying: U) => Partial<U> & {
|
|
2
2
|
makeTransferInvitation: () => Invitation<U>;
|
|
3
3
|
};
|
|
4
4
|
export type OwnableOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-ownable.d.ts","sourceRoot":"","sources":["prepare-ownable.js"],"names":[],"mappings":"AA0CO,+BAlB4B,EAAE,SAAvB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAG,QACvB,OAAO,mBAAmB,EAAE,IAAI,kBAChC,GAAG,CAAC,gBAAgB,CAAC,aAQrB,MAAM,gBAEN,EAAE,YAGF,cAAc,GACZ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"prepare-ownable.d.ts","sourceRoot":"","sources":["prepare-ownable.js"],"names":[],"mappings":"AA0CO,+BAlB4B,EAAE,SAAvB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAG,QACvB,OAAO,mBAAmB,EAAE,IAAI,kBAChC,GAAG,CAAC,gBAAgB,CAAC,aAQrB,MAAM,gBAEN,EAAE,YAGF,cAAc,GACZ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG;IAAC,sBAAsB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,CAAA;CAAC,CA6D5F"}
|
|
@@ -38,7 +38,7 @@ const TransferProposalShape = M.splitRecord({
|
|
|
38
38
|
* The method names of the underlying exo class that should be represented
|
|
39
39
|
* by transparently-forwarding methods of the wrapping ownable object.
|
|
40
40
|
* @param {OwnableOptions} [options]
|
|
41
|
-
* @returns {<U>(underlying: U) =>
|
|
41
|
+
* @returns {<U>(underlying: U) => Partial<U> & {makeTransferInvitation: () => Invitation<U>}}
|
|
42
42
|
*/
|
|
43
43
|
export const prepareOwnable = (
|
|
44
44
|
zone,
|
|
@@ -94,6 +94,10 @@ export const prepareOwnable = (
|
|
|
94
94
|
);
|
|
95
95
|
|
|
96
96
|
const makeOwnable = underlying => makeRevocable(underlying);
|
|
97
|
+
// Using at-ts-ignore rather than at-ts-expect-error because the vscode
|
|
98
|
+
// ts server says it is an error but `yarn lint` says it is not.
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
100
|
+
// @ts-ignore Return type is more precise than revocable supports
|
|
97
101
|
return harden(makeOwnable);
|
|
98
102
|
};
|
|
99
103
|
harden(prepareOwnable);
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA+BO,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;0BAFnF,cAAc;2BAAd,cAAc"}
|
|
@@ -7,10 +7,12 @@ import { Far } from '@endo/marshal';
|
|
|
7
7
|
import { makeNotifier } from '@agoric/notifier';
|
|
8
8
|
import { AmountMath } from '@agoric/ertp';
|
|
9
9
|
|
|
10
|
-
import { multiplyBy } from '
|
|
10
|
+
import { multiplyBy } from '@agoric/ertp/src/ratio.js';
|
|
11
11
|
import { mintQuote } from './priceAuthorityTransform.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
+
* @import {Amount, Brand, Mint} from '@agoric/ertp';
|
|
15
|
+
* @import {Notifier} from '@agoric/notifier';
|
|
14
16
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
15
17
|
*/
|
|
16
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";
|
|
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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Pattern} from '@endo/patterns';
|
|
3
|
+
* @import {ContractMeta, Invitation, Proposal, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
3
4
|
*/
|
|
4
5
|
export const defaultAcceptanceMsg: "The offer has been accepted. Once the contract has been completed, please check your payout";
|
|
5
6
|
export function assertIssuerKeywords(zcf: any, expected: any): void;
|
|
@@ -14,7 +15,7 @@ export function assertNatAssetKind(zcf: any, brand: any): void;
|
|
|
14
15
|
export const depositToSeatSuccessMsg: "Deposit and reallocation successful.";
|
|
15
16
|
export function depositToSeat(zcf: ZCF, recipientSeat: ZCFSeat, amounts: AmountKeywordRecord, payments: PaymentPKeywordRecord): Promise<string>;
|
|
16
17
|
export function withdrawFromSeat(zcf: ZCF, seat: ZCFSeat, amounts: AmountKeywordRecord): Promise<PaymentPKeywordRecord>;
|
|
17
|
-
export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(
|
|
18
|
+
export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(ZoeIssuerRecord<any, import("@endo/patterns").Key> | undefined)[]>;
|
|
18
19
|
/** @type {MapKeywords} */
|
|
19
20
|
export const mapKeywords: MapKeywords;
|
|
20
21
|
export function offerTo<Args extends unknown, Result extends unknown>(zcf: ZCF, invitation: ERef<Invitation<Result, Args>>, keywordMapping: KeywordKeywordRecord | undefined, proposal: Proposal, fromSeat: ZCFSeat, toSeat?: ZCFSeat, offerArgs?: Args): Promise<{
|
|
@@ -30,5 +31,9 @@ export type ExpectedRecord = {
|
|
|
30
31
|
give?: Record<string, null> | undefined;
|
|
31
32
|
exit?: Partial<Record<never, null>> | undefined;
|
|
32
33
|
};
|
|
34
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
33
35
|
import type { Pattern } from '@endo/patterns';
|
|
36
|
+
import type { ZCF } from '@agoric/zoe';
|
|
37
|
+
import type { Invitation } from '@agoric/zoe';
|
|
38
|
+
import type { Proposal } from '@agoric/zoe';
|
|
34
39
|
//# sourceMappingURL=zoeHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH,iIAAkI;AAI3H,oEAON;AAuBM,oCALI,GAAG,QACH,cAAc,UACd,mBAAmB,GACjB,CAAC,GAAC,CAAC,CAOf;AAED,mBAAmB;AACnB,mBADW,IAAI,CAkBb;AAEF,wBAAwB;AACxB,wBADW,SAAS,CAqBlB;AAiBK,uCAHI,OAAO,iBACP,OAAO,QAIgD;AAsB3D,0CAHI,OAAO,YACP,cAAc,QA8BxB;AAGM,+DAGN;AAED,6EAA8E;AAavE,mCANI,GAAG,iBACH,OAAO,WACP,mBAAmB,YACnB,qBAAqB,GACnB,OAAO,CAAC,MAAM,CAAC,CA8B3B;AAYM,sCALI,GAAG,QACH,OAAO,WACP,mBAAmB,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAQ1C;AAWM,oCAJI,GAAG,wBACH,mBAAmB,+EAgB7B;AAED,0BAA0B;AAC1B,0BADW,WAAW,CAYpB;AAiDK,wBAHe,IAAI,kBACJ,MAAM,uBA/BjB,GAAG,cAGH,IAAI,CAAC,WAAW,MAAM,EAAE,IAAI,CAAC,CAAC,kBAG9B,oBAAoB,GAAG,SAAS,YAKhC,QAAQ,YAGR,OAAO,WAGP,OAAO,cAIP,IAAI,GAGF,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAxVa,MAAM,cAAc;0BACpB,MAAM,UAAU;;;;;;;6BAnBqC,aAAa;6BADtD,gBAAgB;yBACyB,aAAa;gCAAb,aAAa;8BAAb,aAAa"}
|
|
@@ -9,6 +9,7 @@ import { atomicTransfer, fromOnly, toOnly } from './atomicTransfer.js';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @import {Pattern} from '@endo/patterns';
|
|
12
|
+
* @import {ContractMeta, Invitation, Proposal, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
export const defaultAcceptanceMsg = `The offer has been accepted. Once the contract has been completed, please check your payout`;
|
|
@@ -26,8 +26,8 @@ export function start(zcf: ZCF<{
|
|
|
26
26
|
winnerPriceOption?: "first-price" | "second-price";
|
|
27
27
|
bidDuration: bigint;
|
|
28
28
|
}>): {
|
|
29
|
-
creatorInvitation: Promise<Invitation<{
|
|
30
|
-
makeBidInvitation: () => Promise<Invitation<unknown, never>>;
|
|
29
|
+
creatorInvitation: Promise<globalThis.Invitation<{
|
|
30
|
+
makeBidInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
31
31
|
getSessionDetails: () => {
|
|
32
32
|
auctionedAssets: any;
|
|
33
33
|
minimumBid: any;
|
|
@@ -37,8 +37,8 @@ export function start(zcf: ZCF<{
|
|
|
37
37
|
timeAuthority: import("@agoric/time").TimerService;
|
|
38
38
|
bids: string | any[];
|
|
39
39
|
};
|
|
40
|
-
} &
|
|
41
|
-
makeBidInvitation: () => Promise<Invitation<unknown, never>>;
|
|
40
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
41
|
+
makeBidInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
42
42
|
getSessionDetails: () => {
|
|
43
43
|
auctionedAssets: any;
|
|
44
44
|
minimumBid: any;
|
|
@@ -60,7 +60,7 @@ export function start(zcf: ZCF<{
|
|
|
60
60
|
timeAuthority: import("@agoric/time").TimerService;
|
|
61
61
|
bids: string | any[];
|
|
62
62
|
};
|
|
63
|
-
} &
|
|
63
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
64
64
|
getCurrentBids: () => any[] | "Bids are hidden for \"second price\" auctions";
|
|
65
65
|
getSessionDetails: () => {
|
|
66
66
|
auctionedAssets: any;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* @param {ZCF<{}>} zcf
|
|
14
14
|
*/
|
|
15
15
|
export function start(zcf: ZCF<{}>): {
|
|
16
|
-
creatorInvitation: Promise<Invitation<unknown, never>>;
|
|
16
|
+
creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
17
17
|
publicFacet: {
|
|
18
18
|
getOffersCount: () => bigint;
|
|
19
|
-
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
20
|
-
} &
|
|
19
|
+
makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
20
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
21
21
|
getOffersCount: () => bigint;
|
|
22
|
-
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
22
|
+
makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
23
23
|
}>;
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=automaticRefund.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {OfferHandler, ZCF} from '@agoric/zoe';
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* Autoswap is a rewrite of Uniswap. Please see the documentation for
|
|
3
6
|
* more https://agoric.com/documentation/zoe/guide/contracts/autoswap.html
|
|
@@ -40,4 +43,5 @@
|
|
|
40
43
|
export function start(zcf: ZCF): Promise<{
|
|
41
44
|
publicFacet: AutoswapPublicFacet;
|
|
42
45
|
}>;
|
|
46
|
+
import type { ZCF } from '@agoric/zoe';
|
|
43
47
|
//# sourceMappingURL=autoswap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAwVb"}
|
|
1
|
+
{"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAwVb;yBAhYmC,aAAa"}
|
|
@@ -13,6 +13,10 @@ import {
|
|
|
13
13
|
calcSecondaryRequired,
|
|
14
14
|
} from '../contractSupport/index.js';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @import {OfferHandler, ZCF} from '@agoric/zoe';
|
|
18
|
+
*/
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
21
|
* Autoswap is a rewrite of Uniswap. Please see the documentation for
|
|
18
22
|
* more https://agoric.com/documentation/zoe/guide/contracts/autoswap.html
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export function start(zcf: ZCF): {
|
|
16
16
|
publicFacet: {
|
|
17
|
-
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
18
|
-
} &
|
|
19
|
-
makeInvitation: () => Promise<Invitation<unknown, never>>;
|
|
17
|
+
makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
18
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
19
|
+
makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
|
|
20
20
|
}>;
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=barterExchange.d.ts.map
|
|
@@ -58,7 +58,7 @@ export function start(zcf: ZCF<{
|
|
|
58
58
|
expiration: bigint;
|
|
59
59
|
underlyingAmount: Amount;
|
|
60
60
|
}>): Promise<{
|
|
61
|
-
creatorInvitation: Promise<Invitation<unknown, never>>;
|
|
61
|
+
creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
62
62
|
}>;
|
|
63
63
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
64
64
|
//# sourceMappingURL=fundedCallSpread.d.ts.map
|
|
@@ -53,13 +53,13 @@ export function start(zcf: ZCF<{
|
|
|
53
53
|
}>): {
|
|
54
54
|
creatorFacet: {
|
|
55
55
|
makeInvitationPair: (longCollateralShare: any) => {
|
|
56
|
-
longInvitation: Promise<Invitation<unknown, never>>;
|
|
57
|
-
shortInvitation: Promise<Invitation<unknown, never>>;
|
|
56
|
+
longInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
57
|
+
shortInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
58
58
|
};
|
|
59
|
-
} &
|
|
59
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
60
60
|
makeInvitationPair: (longCollateralShare: any) => {
|
|
61
|
-
longInvitation: Promise<Invitation<unknown, never>>;
|
|
62
|
-
shortInvitation: Promise<Invitation<unknown, never>>;
|
|
61
|
+
longInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
62
|
+
shortInvitation: Promise<globalThis.Invitation<unknown, never>>;
|
|
63
63
|
};
|
|
64
64
|
}>;
|
|
65
65
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export function start(zcf: ZCF, _privateArgs: unknown, instanceBaggage: import("@agoric/vat-data").Baggage): Promise<{
|
|
17
17
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
18
|
-
makeInvitation(): Promise<Invitation<unknown, never>>;
|
|
18
|
+
makeInvitation(): Promise<globalThis.Invitation<unknown, never>>;
|
|
19
19
|
}>;
|
|
20
20
|
}>;
|
|
21
21
|
//# sourceMappingURL=coveredCall-durable.d.ts.map
|
|
@@ -62,7 +62,7 @@ export function start(zcf: ZCF<{
|
|
|
62
62
|
interestRate: Ratio;
|
|
63
63
|
interestPeriod: bigint;
|
|
64
64
|
}>): Promise<{
|
|
65
|
-
creatorInvitation: Promise<Invitation<unknown, undefined>>;
|
|
65
|
+
creatorInvitation: Promise<globalThis.Invitation<unknown, undefined>>;
|
|
66
66
|
}>;
|
|
67
67
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
68
68
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"AASO,wIA6CN;AAeM,+BAJI,GAAG,UACH,sBAAsB,GACpB,OAAO,CAAC,IAAI,CAAC,CAiBzB"}
|
|
@@ -3,6 +3,10 @@ import { AmountMath } from '@agoric/ertp';
|
|
|
3
3
|
|
|
4
4
|
import { offerTo } from '../../contractSupport/zoeHelpers.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @import {ShutdownWithFailure} from '@agoric/swingset-vat';
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
export const doLiquidation = async (
|
|
7
11
|
zcf,
|
|
8
12
|
collateralSeat,
|
|
@@ -37,7 +41,7 @@ export const doLiquidation = async (
|
|
|
37
41
|
zcf.shutdown('your loan had to be liquidated');
|
|
38
42
|
};
|
|
39
43
|
|
|
40
|
-
/** @type {
|
|
44
|
+
/** @type {ShutdownWithFailure} */
|
|
41
45
|
const closeWithFailure = err => {
|
|
42
46
|
lenderSeat.fail(err);
|
|
43
47
|
collateralSeat.fail(err);
|