@agoric/zoe 0.27.0-upgrade-19-dev-38ca80a.0 → 0.27.0-upgrade-20-dev-ef71cfd.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 +270 -275
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +29 -29
- 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 +8 -2
- 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.js +2 -2
- package/src/contractFacet/zcfZygote.d.ts +9 -1
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +17 -5
- 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/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 +3 -3
- package/src/contracts/automaticRefund.d.ts +3 -3
- 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 +2 -2
- package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
- package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
- 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/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 +2 -2
- package/src/contracts/oracle.d.ts +3 -0
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +1 -0
- package/src/contracts/priceAggregator.d.ts +2 -0
- 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 +5 -0
- 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.map +1 -1
- package/src/instanceRecordStorage.js +3 -1
- package/src/internal-types.d.ts +15 -5
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +9 -4
- 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 +44 -0
- package/src/zoeService/feeMint.d.ts +1 -0
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/feeMint.js +4 -0
- package/src/zoeService/installationStorage.d.ts +3 -2
- package/src/zoeService/installationStorage.d.ts.map +1 -1
- package/src/zoeService/installationStorage.js +2 -5
- 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 +1 -0
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +3 -0
- 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 -1
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +0 -2
- 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 +11 -1
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +8 -1
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +1 -2
- package/src/zoeService/zoeStorageManager.d.ts +5 -5
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +4 -3
- package/tools/fakeVatAdmin.d.ts +9 -2
- 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 +6 -2
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +4 -0
- package/tools/setup-zoe.d.ts +12 -6
- 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
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export function start(zcf: ZCF): Promise<{
|
|
17
17
|
creatorFacet: {
|
|
18
|
-
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
18
|
+
makeInvitation: (value?: bigint) => Promise<globalThis.Invitation<string, undefined>>;
|
|
19
19
|
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
20
20
|
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
21
|
-
makeInvitation: (value?: bigint) => Promise<Invitation<string, undefined>>;
|
|
21
|
+
makeInvitation: (value?: bigint) => Promise<globalThis.Invitation<string, undefined>>;
|
|
22
22
|
getTokenIssuer: () => globalThis.Issuer<"nat", import("@endo/patterns").Key>;
|
|
23
23
|
}>;
|
|
24
24
|
publicFacet: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type OracleContract = ContractOf<typeof start>;
|
|
2
2
|
export type OracleStart = typeof start;
|
|
3
3
|
/**
|
|
4
|
+
* @import {ContractMeta, Invitation, OfferHandler, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
4
5
|
* @import {ContractOf} from '../zoeService/utils.js';
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
@@ -27,4 +28,6 @@ export function start(zcf: ZCF): Promise<{
|
|
|
27
28
|
}>;
|
|
28
29
|
}>;
|
|
29
30
|
import type { ContractOf } from '../zoeService/utils.js';
|
|
31
|
+
import type { ZCF } from '@agoric/zoe';
|
|
32
|
+
import type { Invitation } from '@agoric/zoe';
|
|
30
33
|
//# sourceMappingURL=oracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["oracle.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["oracle.js"],"names":[],"mappings":"6BA6Gc,WAAW,OAAO,KAAK,CAAC;0BACxB,OAAO,KAAK;AAvG1B;;;GAGG;AAEH;;;;GAIG;AACH,2BAFW,GAAG;;;;;;;QAkDV,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;QAhBvB,iCAAiC;qBAArB,WAAW;QAgBvB,iCAAiC;mCAArB,WAAW;;GAwB1B;gCAhG4B,wBAAwB;yBADkB,aAAa;gCAAb,aAAa"}
|
package/src/contracts/oracle.js
CHANGED
|
@@ -105,5 +105,7 @@ export function start(zcf: ZCF<{
|
|
|
105
105
|
}>;
|
|
106
106
|
}>;
|
|
107
107
|
import type { ContractOf } from '../zoeService/utils.js';
|
|
108
|
+
import type { ZCF } from '@agoric/zoe';
|
|
108
109
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
110
|
+
import type { Invitation } from '@agoric/zoe';
|
|
109
111
|
//# sourceMappingURL=priceAggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAqCc,MAAM,GAAG,MAAM,GAAG,MAAM;oCAEzB,QAAQ,CAAC,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;oBAGlD,cAAc,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BAqCc,MAAM,GAAG,MAAM,GAAG,MAAM;oCAEzB,QAAQ,CAAC,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;oBAGlD,cAAc,GAAG,KAAK;sCAolBtB,WAAW,OAAO,KAAK,CAAC;AA/kBtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2BAbW,IAAI;IACZ,KAAK,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC3B,CAAC,eACM;IACR,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;CAC9B;;QA+WA;;;;;;;;;WASG;2CADQ,QAAQ,GAAG,MAAM;mBAaG,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;sCAHQ,QAAQ,GAAG,MAAM,UACjB,WAAW,KACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;QA/ExC;;;;;;;;;WASG;2CADQ,QAAQ,GAAG,MAAM;mBAaG,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;sCAHQ,QAAQ,GAAG,MAAM,UACjB,WAAW,KACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;;;;QAqHxC,sBAAsB;;;;;QAAtB,sBAAsB;;;GAOzB;gCA3lB4B,wBAAwB;yBAEV,aAAa;sCADqB,4BAA4B;gCAC9D,aAAa"}
|
|
@@ -12,29 +12,29 @@ import { Fail, q } from '@endo/errors';
|
|
|
12
12
|
import { E } from '@endo/eventual-send';
|
|
13
13
|
import { Far } from '@endo/marshal';
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
calculateMedian,
|
|
17
|
-
makeOnewayPriceAuthorityKit,
|
|
18
|
-
makePriceQuoteIssuer,
|
|
19
|
-
} from '../contractSupport/index.js';
|
|
20
15
|
import {
|
|
21
16
|
addRatios,
|
|
22
17
|
assertParsableNumber,
|
|
18
|
+
calculateMedian,
|
|
23
19
|
ceilDivideBy,
|
|
24
20
|
floorMultiplyBy,
|
|
21
|
+
makeOnewayPriceAuthorityKit,
|
|
22
|
+
makePriceQuoteIssuer,
|
|
25
23
|
makeRatio,
|
|
26
24
|
makeRatioFromAmounts,
|
|
27
25
|
multiplyRatios,
|
|
28
26
|
parseRatio,
|
|
29
27
|
ratioGTE,
|
|
30
28
|
ratiosSame,
|
|
31
|
-
} from '../contractSupport/
|
|
29
|
+
} from '../contractSupport/index.js';
|
|
32
30
|
|
|
33
31
|
/**
|
|
34
32
|
* @import {LegacyMap} from '@agoric/store'
|
|
35
33
|
* @import {ContractOf} from '../zoeService/utils.js';
|
|
36
34
|
* @import {PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
35
|
+
* @import {Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
37
36
|
*/
|
|
37
|
+
|
|
38
38
|
/** @typedef {bigint | number | string} ParsableNumber */
|
|
39
39
|
/**
|
|
40
40
|
* @typedef {Readonly<ParsableNumber | { data: ParsableNumber }>} OraclePriceSubmission
|
|
@@ -588,8 +588,10 @@ const start = async (zcf, privateArgs) => {
|
|
|
588
588
|
|
|
589
589
|
// Obtain the oracle's publicFacet.
|
|
590
590
|
assert(oracleInstance);
|
|
591
|
-
|
|
592
|
-
|
|
591
|
+
const oracle =
|
|
592
|
+
/** @type {import('./oracle.js').OracleContract['publicFacet']} */ (
|
|
593
|
+
await E(zoe).getPublicFacet(oracleInstance)
|
|
594
|
+
);
|
|
593
595
|
assert(records.has(record), 'Oracle record is already deleted');
|
|
594
596
|
|
|
595
597
|
/** @type {import('@agoric/time').Timestamp} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"AAsCO,6BALI,IAAI,wBAAwB,CAAC,eAC7B,MAAM,WACN,OAAO,kBAAkB,EAAE,OAAO;;;;GA2D5C;;0BA5Ea,IAAI,CAAC,cAAc,CAAC;;;;aACpB,KAAK;;;;cACL,KAAK;;;;;;yBAPG,aAAa;oCAD0D,4BAA4B"}
|
|
@@ -11,6 +11,7 @@ import { provideQuoteMint } from '../contractSupport/priceAuthorityQuoteMint.js'
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
14
|
+
* @import {ZCF} from '@agoric/zoe';
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -24,7 +24,7 @@ export function start(zcf: ZCF<{
|
|
|
24
24
|
pricePerItem: Amount<"nat">;
|
|
25
25
|
}>): {
|
|
26
26
|
creatorFacet: SellItemsCreatorFacet;
|
|
27
|
-
creatorInvitation: Promise<Invitation<string, undefined>>;
|
|
27
|
+
creatorInvitation: Promise<globalThis.Invitation<string, undefined>>;
|
|
28
28
|
publicFacet: SellItemsPublicFacet;
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=sellItems.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {ContractMeta, Invitation, OfferHandler, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* SimpleExchange is an exchange with a simple matching algorithm, which allows
|
|
3
6
|
* an unlimited number of parties to create new orders or accept existing
|
|
@@ -34,4 +37,6 @@ export function start(zcf: ZCF): {
|
|
|
34
37
|
}>;
|
|
35
38
|
}>;
|
|
36
39
|
};
|
|
40
|
+
import type { ZCF } from '@agoric/zoe';
|
|
41
|
+
import type { Invitation } from '@agoric/zoe';
|
|
37
42
|
//# sourceMappingURL=simpleExchange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleExchange.d.ts","sourceRoot":"","sources":["simpleExchange.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2BAFW,GAAG;;;;;;;;;;;;;;EA+Gb"}
|
|
1
|
+
{"version":3,"file":"simpleExchange.d.ts","sourceRoot":"","sources":["simpleExchange.js"],"names":[],"mappings":"AAUA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2BAFW,GAAG;;;;;;;;;;;;;;EA+Gb;yBArIsE,aAAa;gCAAb,aAAa"}
|
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
assertIssuerKeywords,
|
|
9
9
|
} from '../contractSupport/zoeHelpers.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @import {ContractMeta, Invitation, OfferHandler, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
13
|
+
*/
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* SimpleExchange is an exchange with a simple matching algorithm, which allows
|
|
13
17
|
* an unlimited number of parties to create new orders or accept existing
|
|
@@ -3,7 +3,7 @@ type SellItemsPublicFacet = {
|
|
|
3
3
|
getAvailableItems: () => Amount;
|
|
4
4
|
};
|
|
5
5
|
type SellItemsCreatorOnly = {
|
|
6
|
-
makeBuyerInvitation: () => Promise<Invitation>;
|
|
6
|
+
makeBuyerInvitation: () => Promise<import("../types-index").Invitation>;
|
|
7
7
|
};
|
|
8
8
|
type SellItemsCreatorFacet = SellItemsPublicFacet & SellItemsCreatorOnly;
|
|
9
9
|
type SellItemsParameters = {
|
|
@@ -25,36 +25,36 @@ type MintAndSellNFTCreatorFacet = {
|
|
|
25
25
|
};
|
|
26
26
|
type AutomaticRefundPublicFacet = {
|
|
27
27
|
getOffersCount: () => bigint;
|
|
28
|
-
makeInvitation: () => Promise<Invitation>;
|
|
28
|
+
makeInvitation: () => Promise<import("../types-index").Invitation>;
|
|
29
29
|
};
|
|
30
30
|
type AutoswapPublicFacet = {
|
|
31
31
|
/**
|
|
32
32
|
* synonym for
|
|
33
33
|
* makeSwapInInvitation
|
|
34
34
|
*/
|
|
35
|
-
makeSwapInvitation: () => Promise<Invitation>;
|
|
35
|
+
makeSwapInvitation: () => Promise<import("../types-index").Invitation>;
|
|
36
36
|
/**
|
|
37
37
|
* make an invitation
|
|
38
38
|
* that allows one to do a swap in which the In amount is specified and the Out
|
|
39
39
|
* amount is calculated
|
|
40
40
|
*/
|
|
41
|
-
makeSwapInInvitation: () => Promise<Invitation>;
|
|
41
|
+
makeSwapInInvitation: () => Promise<import("../types-index").Invitation>;
|
|
42
42
|
/**
|
|
43
43
|
* make an invitation
|
|
44
44
|
* that allows one to do a swap in which the Out amount is specified and the In
|
|
45
45
|
* amount is calculated
|
|
46
46
|
*/
|
|
47
|
-
makeSwapOutInvitation: () => Promise<Invitation>;
|
|
47
|
+
makeSwapOutInvitation: () => Promise<import("../types-index").Invitation>;
|
|
48
48
|
/**
|
|
49
49
|
* make an
|
|
50
50
|
* invitation that allows one to add liquidity to the pool.
|
|
51
51
|
*/
|
|
52
|
-
makeAddLiquidityInvitation: () => Promise<Invitation>;
|
|
52
|
+
makeAddLiquidityInvitation: () => Promise<import("../types-index").Invitation>;
|
|
53
53
|
/**
|
|
54
54
|
* make an
|
|
55
55
|
* invitation that allows one to remove liquidity from the pool.
|
|
56
56
|
*/
|
|
57
|
-
makeRemoveLiquidityInvitation: () => Promise<Invitation>;
|
|
57
|
+
makeRemoveLiquidityInvitation: () => Promise<import("../types-index").Invitation>;
|
|
58
58
|
getLiquidityIssuer: () => Issuer;
|
|
59
59
|
/**
|
|
60
60
|
* get the current value of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-amb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
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @property {() => Amount} getAvailableItems
|
|
5
5
|
*
|
|
6
6
|
* @typedef {object} SellItemsCreatorOnly
|
|
7
|
-
* @property {() => Promise<Invitation>} makeBuyerInvitation
|
|
7
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeBuyerInvitation
|
|
8
8
|
*
|
|
9
9
|
* @typedef {SellItemsPublicFacet & SellItemsCreatorOnly} SellItemsCreatorFacet
|
|
10
10
|
*/
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
/**
|
|
32
32
|
* @typedef {object} AutomaticRefundPublicFacet
|
|
33
33
|
* @property {() => bigint} getOffersCount
|
|
34
|
-
* @property {() => Promise<Invitation>} makeInvitation
|
|
34
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeInvitation
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @typedef {object} AutoswapPublicFacet
|
|
39
|
-
* @property {() => Promise<Invitation>} makeSwapInvitation synonym for
|
|
39
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapInvitation synonym for
|
|
40
40
|
* makeSwapInInvitation
|
|
41
|
-
* @property {() => Promise<Invitation>} makeSwapInInvitation make an invitation
|
|
41
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapInInvitation make an invitation
|
|
42
42
|
* that allows one to do a swap in which the In amount is specified and the Out
|
|
43
43
|
* amount is calculated
|
|
44
|
-
* @property {() => Promise<Invitation>} makeSwapOutInvitation make an invitation
|
|
44
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeSwapOutInvitation make an invitation
|
|
45
45
|
* that allows one to do a swap in which the Out amount is specified and the In
|
|
46
46
|
* amount is calculated
|
|
47
|
-
* @property {() => Promise<Invitation>} makeAddLiquidityInvitation make an
|
|
47
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeAddLiquidityInvitation make an
|
|
48
48
|
* invitation that allows one to add liquidity to the pool.
|
|
49
|
-
* @property {() => Promise<Invitation>} makeRemoveLiquidityInvitation make an
|
|
49
|
+
* @property {() => Promise<import('../types-index').Invitation>} makeRemoveLiquidityInvitation make an
|
|
50
50
|
* invitation that allows one to remove liquidity from the pool.
|
|
51
51
|
* @property {() => Issuer} getLiquidityIssuer
|
|
52
52
|
* @property {() => bigint} getLiquiditySupply get the current value of
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @import {ContractMeta, HandleOffer, ZCF} from '@agoric/zoe';
|
|
2
3
|
* @import { Baggage } from '@agoric/vat-data';
|
|
3
4
|
*/
|
|
4
5
|
/** @type {ContractMeta<typeof start>} */
|
|
@@ -7,11 +8,13 @@ export function start(zcf: ZCF<{}>, _privateArgs: undefined, baggage: Baggage):
|
|
|
7
8
|
publicFacet: import("@endo/exo").Guarded<{
|
|
8
9
|
getValue(): import("@agoric/vow").Vow<any>;
|
|
9
10
|
setValue(value: any): void;
|
|
10
|
-
makeGetterInvitation(): Promise<Invitation<import("@agoric/vow").Vow<any>, undefined>>;
|
|
11
|
-
makeSetterInvitation(): Promise<Invitation<void, {
|
|
11
|
+
makeGetterInvitation(): Promise<globalThis.Invitation<import("@agoric/vow").Vow<any>, undefined>>;
|
|
12
|
+
makeSetterInvitation(): Promise<globalThis.Invitation<void, {
|
|
12
13
|
value: unknown;
|
|
13
14
|
}>>;
|
|
14
15
|
}>;
|
|
15
16
|
};
|
|
17
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
18
|
+
import type { ZCF } from '@agoric/zoe';
|
|
16
19
|
import type { Baggage } from '@agoric/vat-data';
|
|
17
20
|
//# sourceMappingURL=valueVow.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,IAAI,EAAE,CAAC,gBACP,SAAS,WACT,OAAO;;;;;;mBA8B4B,OAAO;;;EAWpD;kCA1DgD,aAAa;yBAAb,aAAa;6BAClC,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanceRecordStorage.d.ts","sourceRoot":"","sources":["instanceRecordStorage.js"],"names":[],"mappings":"AA6BO,mDAHI,OAAO,kBAAkB,EAAE,OAAO,GAChC,CAAC,EAAE,EAAE,cAAc,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"instanceRecordStorage.d.ts","sourceRoot":"","sources":["instanceRecordStorage.js"],"names":[],"mappings":"AA6BO,mDAHI,OAAO,kBAAkB,EAAE,OAAO,GAChC,CAAC,EAAE,EAAE,cAAc,KAAK,aAAa,CAqFjD"}
|
|
@@ -47,8 +47,10 @@ export const makeInstanceRecordStorage = baggage => {
|
|
|
47
47
|
baggage,
|
|
48
48
|
'InstanceRecord',
|
|
49
49
|
InstanceRecordI,
|
|
50
|
-
|
|
50
|
+
/** @type {(ir: InstanceRecord) => {instanceRecord: InstanceRecord}} */
|
|
51
|
+
ir => harden({ instanceRecord: ir }),
|
|
51
52
|
{
|
|
53
|
+
/** @type {(keyword: Keyword, issuerRecord: ZoeIssuerRecord) => void} */
|
|
52
54
|
addIssuer(keyword, issuerRecord) {
|
|
53
55
|
const { state } = this;
|
|
54
56
|
!ownKeys(issuerRecord).includes(keyword) ||
|
package/src/internal-types.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ type HandleOfferObj = {
|
|
|
73
73
|
type ZoeInstanceAdminMakeInvitation = (invitationHandle: InvitationHandle, description: string, customDetails?: Record<string, any> | undefined, proposalShape?: Pattern) => Invitation;
|
|
74
74
|
type ZoeInstanceAdmin = {
|
|
75
75
|
makeInvitation: ZoeInstanceAdminMakeInvitation;
|
|
76
|
-
saveIssuer: <I extends Issuer>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M> ?
|
|
76
|
+
saveIssuer: <I extends Issuer>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M> ? ZoeIssuerRecord<K, M> : never>;
|
|
77
77
|
makeZoeMint: MakeZoeMint;
|
|
78
78
|
registerFeeMint: RegisterFeeMint;
|
|
79
79
|
makeNoEscrowSeat: MakeNoEscrowSeat;
|
|
@@ -101,7 +101,7 @@ type SeatHandleAllocation = {
|
|
|
101
101
|
allocation: Allocation;
|
|
102
102
|
};
|
|
103
103
|
type ZoeMint<K extends AssetKind = globalThis.AssetKind> = {
|
|
104
|
-
getIssuerRecord: () => IssuerRecord<K>;
|
|
104
|
+
getIssuerRecord: () => import("@agoric/ertp").IssuerRecord<K>;
|
|
105
105
|
mintAndEscrow: (totalToMint: Amount<K>) => void;
|
|
106
106
|
/**
|
|
107
107
|
* Note that the burning is asynchronous, and so may not have happened by
|
|
@@ -117,7 +117,7 @@ type ZCFRoot = {
|
|
|
117
117
|
};
|
|
118
118
|
type ExecuteContractResult = {
|
|
119
119
|
creatorFacet: object;
|
|
120
|
-
creatorInvitation?: Promise<Invitation
|
|
120
|
+
creatorInvitation?: Promise<globalThis.Invitation> | undefined;
|
|
121
121
|
publicFacet: object;
|
|
122
122
|
handleOfferObj: HandleOfferObj;
|
|
123
123
|
};
|
|
@@ -134,7 +134,7 @@ type SeatHandle = Handle<"Seat">;
|
|
|
134
134
|
* To be deleted when brands have a property for assetKind
|
|
135
135
|
*/
|
|
136
136
|
type GetAssetKindByBrand = (brand: Brand) => AssetKind;
|
|
137
|
-
type IssuerRecords = Array<
|
|
137
|
+
type IssuerRecords = Array<ZoeIssuerRecord>;
|
|
138
138
|
type MakeZCFSeat = (seatData: SeatData) => ZCFSeat;
|
|
139
139
|
/**
|
|
140
140
|
* Drops all of the references in the seat-related weakStores by
|
|
@@ -152,7 +152,7 @@ type ZcfMintReallocator = {
|
|
|
152
152
|
* Add an issuer and its keyword to the instanceRecord for the
|
|
153
153
|
* contract instance
|
|
154
154
|
*/
|
|
155
|
-
type InstanceStateAddIssuer = (keyword: Keyword, issuerRecord:
|
|
155
|
+
type InstanceStateAddIssuer = (keyword: Keyword, issuerRecord: ZoeIssuerRecord) => void;
|
|
156
156
|
type InstanceState = {
|
|
157
157
|
addIssuer: InstanceStateAddIssuer;
|
|
158
158
|
getInstanceRecord: () => InstanceRecord;
|
|
@@ -162,4 +162,14 @@ type InstanceState = {
|
|
|
162
162
|
getBrands: () => BrandKeywordRecord;
|
|
163
163
|
assertUniqueKeyword: (keyword: Keyword) => void;
|
|
164
164
|
};
|
|
165
|
+
import type { Allocation } from '@agoric/zoe';
|
|
166
|
+
import type { AnyTerms } from '@agoric/zoe';
|
|
167
|
+
import type { BrandKeywordRecord } from '@agoric/zoe';
|
|
168
|
+
import type { Completion } from '@agoric/zoe';
|
|
169
|
+
import type { ContractStartFn } from '@agoric/zoe';
|
|
170
|
+
import type { InvitationHandle } from '@agoric/zoe';
|
|
171
|
+
import type { PaymentPKeywordRecord } from '@agoric/zoe';
|
|
172
|
+
import type { UserSeat } from '@agoric/zoe';
|
|
173
|
+
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
174
|
+
import type { Pattern } from '@endo/patterns';
|
|
165
175
|
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";cAUc,cAAc;uBACd,UAAU;gBACV,UAAU;gBACV,MAAM;;;;;qCAOT,UAAU,KACR,qBAAqB;;sBAKpB,CAAC,UAAU,EAAC,UAAU,KAAK,qBAAqB;;;sBAKhD,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI;eACpC,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO;;;cAKvC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ACJ,OAAO,CAAC,qBAAqB,CAAC;sCAKhC,MAAM,KACJ,OAAO,CAAC,gCAAgC,CAAC;8BAK3C,cAAc,gBACd,OAAO,KACL,OAAO;;UAKN,MAAM,IAAI;;kBAIX,MAAM,CAAC,MAAM,CAAC;;;;;;mCAShB,KAAK,KACH,SAAS;qBAIT,KAAK,CAAC,eAAe,CAAC;8BAKxB,QAAQ,KACN,OAAO;;;;;+BAQP,IAAI;;iBAKH,WAAW;uBACX,iBAAiB;;;gBAKjB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,KAAK,IAAI;;;;;;wCASxD,OAAO,gBACP,eAAe,KACb,IAAI;;eAKH,sBAAsB;uBACtB,MAAM,cAAc;cACpB,MAAM,QAAQ;qBACd,MAAM,YAAY;gBAClB,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;yBACxB,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;;gCAlToH,aAAa;8BAAb,aAAa;wCAAb,aAAa;gCAAb,aAAa;qCAAb,aAAa;sCAAb,aAAa;2CAAb,aAAa;8BAAb,aAAa;qCAAb,aAAa;6BAC/I,gBAAgB"}
|
package/src/internal-types.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
/// <reference types="@agoric/ertp/exported" />
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @import {Allocation, AnyTerms, BrandKeywordRecord, Completion, ContractStartFn, InvitationHandle, PaymentPKeywordRecord, UserSeat, ZoeIssuerRecord} from '@agoric/zoe';
|
|
6
|
+
* @import {Pattern} from '@endo/patterns';
|
|
7
|
+
*/
|
|
8
|
+
|
|
4
9
|
/**
|
|
5
10
|
* @typedef {object} SeatData
|
|
6
11
|
* @property {ProposalRecord} proposal
|
|
@@ -128,7 +133,7 @@
|
|
|
128
133
|
* @property {ZoeInstanceAdminMakeInvitation} makeInvitation
|
|
129
134
|
* @property {<I extends Issuer>(issuerP: ERef<I>,
|
|
130
135
|
* keyword: Keyword
|
|
131
|
-
* ) => Promise<I extends Issuer<infer K, infer M> ?
|
|
136
|
+
* ) => Promise<I extends Issuer<infer K, infer M> ? ZoeIssuerRecord<K, M> : never>} saveIssuer
|
|
132
137
|
* @property {MakeZoeMint} makeZoeMint
|
|
133
138
|
* @property {RegisterFeeMint} registerFeeMint
|
|
134
139
|
* @property {MakeNoEscrowSeat} makeNoEscrowSeat
|
|
@@ -191,7 +196,7 @@
|
|
|
191
196
|
/**
|
|
192
197
|
* @template {AssetKind} [K=AssetKind]
|
|
193
198
|
* @typedef {object} ZoeMint
|
|
194
|
-
* @property {() => IssuerRecord<K>} getIssuerRecord
|
|
199
|
+
* @property {() => import('@agoric/ertp').IssuerRecord<K>} getIssuerRecord
|
|
195
200
|
* @property {(totalToMint: Amount<K>) => void} mintAndEscrow
|
|
196
201
|
* @property {(totalToBurn: Amount<K>) => void} withdrawAndBurn
|
|
197
202
|
* Note that the burning is asynchronous, and so may not have happened by
|
|
@@ -256,7 +261,7 @@
|
|
|
256
261
|
*/
|
|
257
262
|
|
|
258
263
|
/**
|
|
259
|
-
* @typedef {Array<
|
|
264
|
+
* @typedef {Array<ZoeIssuerRecord>} IssuerRecords
|
|
260
265
|
*/
|
|
261
266
|
|
|
262
267
|
/**
|
|
@@ -291,7 +296,7 @@
|
|
|
291
296
|
* contract instance
|
|
292
297
|
*
|
|
293
298
|
* @param {Keyword} keyword
|
|
294
|
-
* @param {
|
|
299
|
+
* @param {ZoeIssuerRecord} issuerRecord
|
|
295
300
|
* @returns {void}
|
|
296
301
|
*/
|
|
297
302
|
|
package/src/issuerRecord.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export function makeIssuerRecord<K extends AssetKind>(brand: Brand<K>, issuer: Issuer<K>, displayInfo: DisplayInfo<K>):
|
|
2
|
-
export function assertFullIssuerRecord(issuerRecord: IssuerRecord): asserts issuerRecord is Required<IssuerRecord>;
|
|
1
|
+
export function makeIssuerRecord<K extends AssetKind>(brand: Brand<K>, issuer: Issuer<K>, displayInfo: DisplayInfo<K>): ZoeIssuerRecord<K>;
|
|
2
|
+
export function assertFullIssuerRecord(issuerRecord: IssuerRecord<any>): asserts issuerRecord is Required<IssuerRecord>;
|
|
3
|
+
import type { IssuerRecord } from '@agoric/ertp';
|
|
3
4
|
//# sourceMappingURL=issuerRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuerRecord.d.ts","sourceRoot":"","sources":["issuerRecord.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issuerRecord.d.ts","sourceRoot":"","sources":["issuerRecord.js"],"names":[],"mappings":"AAiBO,iCANkB,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,UACR,MAAM,CAAC,CAAC,CAAC,eACT,WAAW,CAAC,CAAC,CAAC,GACZ,gBAAgB,CAAC,CAAC,CAQ3B;AAMG,qDAHI,aAAa,GAAG,CAAC,GACf,QAAQ,YAAY,IAAI,QAAQ,CAAC,YAAY,CAAC,CAM1D;kCA7B8B,cAAc"}
|
package/src/issuerRecord.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
import { Fail } from '@endo/errors';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @import {IssuerRecord} from '@agoric/ertp';
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
9
|
* Put together information about the issuer in a standard format that
|
|
6
10
|
* is synchronously accessible.
|
|
@@ -9,7 +13,7 @@ import { Fail } from '@endo/errors';
|
|
|
9
13
|
* @param {Brand<K>} brand
|
|
10
14
|
* @param {Issuer<K>} issuer
|
|
11
15
|
* @param {DisplayInfo<K>} displayInfo
|
|
12
|
-
* @returns {
|
|
16
|
+
* @returns {ZoeIssuerRecord<K>}
|
|
13
17
|
*/
|
|
14
18
|
export const makeIssuerRecord = (brand, issuer, displayInfo) =>
|
|
15
19
|
harden({
|
|
@@ -20,7 +24,7 @@ export const makeIssuerRecord = (brand, issuer, displayInfo) =>
|
|
|
20
24
|
});
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
|
-
* @param {IssuerRecord} issuerRecord
|
|
27
|
+
* @param {IssuerRecord<any>} issuerRecord
|
|
24
28
|
* @returns {asserts issuerRecord is Required<IssuerRecord>}
|
|
25
29
|
*/
|
|
26
30
|
export const assertFullIssuerRecord = issuerRecord => {
|
package/src/issuerStorage.d.ts
CHANGED
|
@@ -3,12 +3,13 @@ export function provideIssuerStorage(zcfBaggage: import("@agoric/vat-data").Bagg
|
|
|
3
3
|
issuers: IssuerKeywordRecord;
|
|
4
4
|
brands: BrandKeywordRecord;
|
|
5
5
|
}>;
|
|
6
|
-
storeIssuer: (issuerP: ERef<Issuer>) => Promise<
|
|
7
|
-
storeIssuerRecord: (issuerRecord:
|
|
6
|
+
storeIssuer: (issuerP: ERef<Issuer>) => Promise<ZoeIssuerRecord>;
|
|
7
|
+
storeIssuerRecord: (issuerRecord: ZoeIssuerRecord) => ZoeIssuerRecord;
|
|
8
8
|
getAssetKindByBrand: GetAssetKindByBrand;
|
|
9
9
|
getBrandForIssuer: <K extends AssetKind>(issuer: Issuer<K>) => Brand<K>;
|
|
10
10
|
getIssuerForBrand: <K extends AssetKind>(brand: Brand<K>) => Issuer<K>;
|
|
11
11
|
getIssuerRecords: (issuers: Issuer[]) => IssuerRecords;
|
|
12
12
|
instantiate: (issuerRecords?: any[]) => void;
|
|
13
13
|
};
|
|
14
|
+
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
14
15
|
//# sourceMappingURL=issuerStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"AAoBO,iDAFI,OAAO,kBAAkB,EAAE,OAAO;2DAwHhC,mBAAmB,KACjB,OAAO,CAAC;QAAE,OAAO,EAAE,mBAAmB,CAAC;QAC7B,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC;2BAnDzC,IAAI,CAAC,MAAM,CAAC,KACV,OAAO,CAAE,eAAe,CAAC;sCAzB3B,eAAe,KACb,eAAe;;wBAyFH,CAAC,SAAZ,SAAU,UACb,MAAM,CAAC,CAAC,CAAC,KACP,KAAK,CAAC,CAAC,CAAC;wBASI,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,KACN,MAAM,CAAC,CAAC,CAAC;gCASX,MAAM,EAAE,KACN,aAAa;;EA2B3B;qCAjMiC,aAAa"}
|
package/src/issuerStorage.js
CHANGED
|
@@ -10,6 +10,7 @@ const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
|
|
13
|
+
* @import {ZoeIssuerRecord} from '@agoric/zoe';
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -18,12 +19,12 @@ const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
|
|
|
18
19
|
* @param {import('@agoric/vat-data').Baggage} zcfBaggage
|
|
19
20
|
*/
|
|
20
21
|
export const provideIssuerStorage = zcfBaggage => {
|
|
21
|
-
/** @type {WeakMapStore<Brand,
|
|
22
|
+
/** @type {WeakMapStore<Brand, ZoeIssuerRecord>} */
|
|
22
23
|
const brandToIssuerRecord = provideDurableWeakMapStore(
|
|
23
24
|
zcfBaggage,
|
|
24
25
|
'brandToIssuerRecord',
|
|
25
26
|
);
|
|
26
|
-
/** @type {WeakMapStore<Issuer,
|
|
27
|
+
/** @type {WeakMapStore<Issuer, ZoeIssuerRecord>} */
|
|
27
28
|
const issuerToIssuerRecord = provideDurableWeakMapStore(
|
|
28
29
|
zcfBaggage,
|
|
29
30
|
'issuerToIssuerRecord',
|
|
@@ -62,8 +63,8 @@ export const provideIssuerStorage = zcfBaggage => {
|
|
|
62
63
|
* to add the issuer again in ZCF.
|
|
63
64
|
*
|
|
64
65
|
*
|
|
65
|
-
* @param {
|
|
66
|
-
* @returns {
|
|
66
|
+
* @param {ZoeIssuerRecord} issuerRecord
|
|
67
|
+
* @returns {ZoeIssuerRecord}
|
|
67
68
|
*/
|
|
68
69
|
const storeIssuerRecord = issuerRecord => {
|
|
69
70
|
assertInstantiated();
|
|
@@ -87,7 +88,7 @@ export const provideIssuerStorage = zcfBaggage => {
|
|
|
87
88
|
* Otherwise, make and save the issuerRecord.
|
|
88
89
|
*
|
|
89
90
|
* @param {ERef<Issuer>} issuerP
|
|
90
|
-
* @returns {Promise<
|
|
91
|
+
* @returns {Promise< ZoeIssuerRecord>}
|
|
91
92
|
*/
|
|
92
93
|
const storeIssuer = async issuerP => {
|
|
93
94
|
assertInstantiated();
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
+
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
3
4
|
*/
|
|
4
5
|
export const KeywordShape: import("@endo/patterns").Matcher;
|
|
5
6
|
/** @type {TypedPattern<InvitationHandle>} */
|
|
@@ -16,7 +17,8 @@ export const PaymentPKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
|
16
17
|
export const IssuerKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
17
18
|
export const IssuerPKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
18
19
|
export const BrandKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
19
|
-
|
|
20
|
+
/** @type {TypedPattern<ZoeIssuerRecord>} */
|
|
21
|
+
export const IssuerRecordShape: TypedPattern<ZoeIssuerRecord>;
|
|
20
22
|
export namespace TermsShape {
|
|
21
23
|
export { IssuerKeywordRecordShape as issuers };
|
|
22
24
|
export { BrandKeywordRecordShape as brands };
|
|
@@ -38,10 +40,10 @@ export namespace FullProposalShape {
|
|
|
38
40
|
export const ProposalShape: import("@endo/patterns").Matcher;
|
|
39
41
|
export const EmptyProposalShape: import("@endo/patterns").Matcher;
|
|
40
42
|
export function isOnDemandExitRule(exit: any): boolean;
|
|
41
|
-
export function isWaivedExitRule(exit: ExitRule): exit is WaivedExitRule;
|
|
42
|
-
export function isAfterDeadlineExitRule(exit: ExitRule): exit is AfterDeadlineExitRule;
|
|
43
|
-
/** @type {TypedPattern<InvitationDetails>} */
|
|
44
|
-
export const InvitationElementShape: TypedPattern<InvitationDetails>;
|
|
43
|
+
export function isWaivedExitRule(exit: import("./types-index").ExitRule): exit is WaivedExitRule;
|
|
44
|
+
export function isAfterDeadlineExitRule(exit: import("./types-index").ExitRule): exit is AfterDeadlineExitRule;
|
|
45
|
+
/** @type {TypedPattern<import('./types-index').InvitationDetails>} */
|
|
46
|
+
export const InvitationElementShape: TypedPattern<import("./types-index").InvitationDetails>;
|
|
45
47
|
export const OfferHandlerI: import("@endo/patterns").InterfaceGuard<{
|
|
46
48
|
handle: import("@endo/patterns").MethodGuard;
|
|
47
49
|
}>;
|
|
@@ -166,8 +168,10 @@ export const HandleOfferI: import("@endo/patterns").InterfaceGuard<{
|
|
|
166
168
|
}>;
|
|
167
169
|
export namespace PriceQuoteShape {
|
|
168
170
|
export { AmountShape as quoteAmount };
|
|
169
|
-
export let quotePayment:
|
|
171
|
+
export let quotePayment: Pattern;
|
|
170
172
|
}
|
|
171
173
|
import type { TypedPattern } from '@agoric/internal';
|
|
174
|
+
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
175
|
+
import type { AfterDeadlineExitRule } from '@agoric/zoe';
|
|
172
176
|
import { AmountShape } from '@agoric/ertp';
|
|
173
177
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;;GAGG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,4CAA4C;AAC5C,gCADW,aAAa,eAAe,CAAC,CAQtC;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,qBAAqB,CAKzC;AAGD,sEAAsE;AACtE,qCADW,aAAa,OAAO,eAAe,EAAE,iBAAiB,CAAC,CAM/D;AAEH;;GAEG;AAEH,0EAGG;AAEH,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAAuD;AACvD,2DAGE;AAEF,0EAQE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;GAKG;AAEH,6DASE;AAEF;;GAKG;;;;;kCA/X4B,kBAAkB;qCACQ,aAAa;2CAAb,aAAa;4BAP/D,cAAc"}
|