@agoric/zoe 0.27.0-upgrade-20-dev-ef71cfd.0 → 0.27.0-upgrade-19-devnet-dev-5428c4d.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 +275 -270
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +29 -29
- package/src/cleanProposal.d.ts +0 -2
- package/src/cleanProposal.d.ts.map +1 -1
- package/src/cleanProposal.js +2 -4
- package/src/contractFacet/exit.d.ts +1 -1
- package/src/contractFacet/exit.d.ts.map +1 -1
- package/src/contractFacet/internal-types.d.ts +8 -0
- package/src/contractFacet/internal-types.d.ts.map +1 -0
- package/src/contractFacet/internal-types.js +15 -0
- package/src/contractFacet/offerHandlerStorage.d.ts +1 -1
- package/src/contractFacet/rightsConservation.d.ts.map +1 -1
- package/src/contractFacet/rightsConservation.js +1 -0
- package/src/contractFacet/{types.ts → types-ambient.d.ts} +29 -66
- package/src/contractFacet/types-ambient.js +1 -0
- package/src/contractFacet/vatRoot.d.ts +2 -8
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/vatRoot.js +4 -5
- package/src/contractFacet/zcfMint.d.ts +2 -3
- 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 +1 -9
- package/src/contractFacet/zcfZygote.d.ts.map +1 -1
- package/src/contractFacet/zcfZygote.js +5 -17
- package/src/contractSupport/atomicTransfer.d.ts +0 -6
- package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
- package/src/contractSupport/atomicTransfer.js +0 -4
- package/src/contractSupport/bondingCurves.js +1 -1
- package/src/contractSupport/index.d.ts +2 -2
- package/src/contractSupport/index.js +19 -2
- package/src/contractSupport/priceAuthorityInitial.d.ts +0 -2
- package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityInitial.js +1 -3
- package/src/contractSupport/ratio.d.ts +37 -0
- package/src/contractSupport/ratio.d.ts.map +1 -0
- package/src/contractSupport/ratio.js +419 -0
- package/src/contractSupport/safeMath.d.ts +11 -0
- package/src/contractSupport/safeMath.d.ts.map +1 -0
- package/src/contractSupport/safeMath.js +49 -0
- package/src/contractSupport/types-ambient.d.ts.map +1 -1
- package/src/contractSupport/types-ambient.js +0 -1
- package/src/contractSupport/zoeHelpers.d.ts +1 -6
- package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
- package/src/contractSupport/zoeHelpers.js +0 -1
- 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 +0 -4
- package/src/contracts/autoswap.d.ts.map +1 -1
- package/src/contracts/autoswap.js +0 -4
- 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 +0 -3
- package/src/contracts/oracle.d.ts.map +1 -1
- package/src/contracts/oracle.js +0 -1
- package/src/contracts/priceAggregator.d.ts +0 -2
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +8 -10
- package/src/contracts/scaledPriceAuthority.d.ts +0 -1
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +0 -1
- package/src/contracts/sellItems.d.ts +1 -1
- package/src/contracts/simpleExchange.d.ts +0 -5
- package/src/contracts/simpleExchange.d.ts.map +1 -1
- package/src/contracts/simpleExchange.js +0 -4
- 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 +2 -5
- package/src/contracts/valueVow.contract.d.ts.map +1 -1
- package/src/contracts/valueVow.contract.js +0 -1
- package/src/instanceRecordStorage.d.ts.map +1 -1
- package/src/instanceRecordStorage.js +1 -3
- package/src/internal-types.d.ts +5 -15
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +4 -9
- package/src/issuerRecord.d.ts +2 -3
- package/src/issuerRecord.d.ts.map +1 -1
- package/src/issuerRecord.js +2 -6
- package/src/issuerStorage.d.ts +2 -3
- package/src/issuerStorage.d.ts.map +1 -1
- package/src/issuerStorage.js +5 -6
- package/src/typeGuards.d.ts +6 -10
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +5 -7
- package/src/types-ambient.d.ts +40 -0
- package/src/types-ambient.d.ts.map +1 -1
- package/src/types-ambient.js +42 -4
- package/src/zoeService/feeMint.d.ts +0 -1
- package/src/zoeService/feeMint.d.ts.map +1 -1
- package/src/zoeService/feeMint.js +0 -4
- package/src/zoeService/installationStorage.d.ts +2 -3
- package/src/zoeService/installationStorage.d.ts.map +1 -1
- package/src/zoeService/installationStorage.js +5 -2
- package/src/zoeService/internal-types.d.ts +3 -11
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +3 -9
- package/src/zoeService/invitationQueries.d.ts +3 -3
- package/src/zoeService/invitationQueries.js +3 -3
- package/src/zoeService/makeInvitation.d.ts +0 -1
- package/src/zoeService/makeInvitation.d.ts.map +1 -1
- package/src/zoeService/makeInvitation.js +0 -3
- package/src/zoeService/offer/offer.d.ts +0 -1
- package/src/zoeService/offer/offer.d.ts.map +1 -1
- package/src/zoeService/offer/offer.js +1 -3
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +1 -0
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +2 -0
- package/src/zoeService/types-ambient.d.ts +226 -0
- package/src/zoeService/types-ambient.d.ts.map +1 -1
- package/src/zoeService/types-ambient.js +327 -4
- package/src/zoeService/utils.d.ts +5 -13
- package/src/zoeService/utils.test-d.ts +0 -1
- package/src/zoeService/zoe.d.ts +1 -11
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +1 -8
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +2 -1
- package/src/zoeService/zoeStorageManager.d.ts +5 -5
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +3 -4
- package/tools/fakeVatAdmin.d.ts +2 -9
- package/tools/fakeVatAdmin.d.ts.map +1 -1
- package/tools/fakeVatAdmin.js +10 -18
- package/tools/manualPriceAuthority.d.ts +1 -4
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +0 -1
- package/tools/scriptedOracle.d.ts +2 -6
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +0 -4
- package/tools/setup-zoe.d.ts +6 -12
- package/tools/setup-zoe.d.ts.map +1 -1
- package/tools/setup-zoe.js +5 -38
- package/tools/test-utils.d.ts +1 -1
- package/tools/test-utils.js +1 -1
- package/tools/types.d.ts +0 -1
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +0 -1
- package/src/contractFacet/types.d.ts +0 -184
- package/src/contractFacet/types.d.ts.map +0 -1
- package/src/types-index.d.ts +0 -4
- package/src/types-index.js +0 -2
- package/src/types.d.ts +0 -29
- package/src/types.d.ts.map +0 -1
- package/src/types.ts +0 -44
- package/src/zoeService/types.d.ts +0 -238
- package/src/zoeService/types.d.ts.map +0 -1
- package/src/zoeService/types.ts +0 -307
|
@@ -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,CAmFjD"}
|
|
@@ -47,10 +47,8 @@ export const makeInstanceRecordStorage = baggage => {
|
|
|
47
47
|
baggage,
|
|
48
48
|
'InstanceRecord',
|
|
49
49
|
InstanceRecordI,
|
|
50
|
-
|
|
51
|
-
ir => harden({ instanceRecord: ir }),
|
|
50
|
+
record => harden({ instanceRecord: record }),
|
|
52
51
|
{
|
|
53
|
-
/** @type {(keyword: Keyword, issuerRecord: ZoeIssuerRecord) => void} */
|
|
54
52
|
addIssuer(keyword, issuerRecord) {
|
|
55
53
|
const { state } = this;
|
|
56
54
|
!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> ? IssuerRecord<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: () =>
|
|
104
|
+
getIssuerRecord: () => 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<
|
|
120
|
+
creatorInvitation?: Promise<Invitation<unknown, undefined>> | 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<IssuerRecord>;
|
|
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: IssuerRecord) => void;
|
|
156
156
|
type InstanceState = {
|
|
157
157
|
addIssuer: InstanceStateAddIssuer;
|
|
158
158
|
getInstanceRecord: () => InstanceRecord;
|
|
@@ -162,14 +162,4 @@ 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';
|
|
175
165
|
//# 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":"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"}
|
package/src/internal-types.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
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
|
-
|
|
9
4
|
/**
|
|
10
5
|
* @typedef {object} SeatData
|
|
11
6
|
* @property {ProposalRecord} proposal
|
|
@@ -133,7 +128,7 @@
|
|
|
133
128
|
* @property {ZoeInstanceAdminMakeInvitation} makeInvitation
|
|
134
129
|
* @property {<I extends Issuer>(issuerP: ERef<I>,
|
|
135
130
|
* keyword: Keyword
|
|
136
|
-
* ) => Promise<I extends Issuer<infer K, infer M> ?
|
|
131
|
+
* ) => Promise<I extends Issuer<infer K, infer M> ? IssuerRecord<K, M> : never>} saveIssuer
|
|
137
132
|
* @property {MakeZoeMint} makeZoeMint
|
|
138
133
|
* @property {RegisterFeeMint} registerFeeMint
|
|
139
134
|
* @property {MakeNoEscrowSeat} makeNoEscrowSeat
|
|
@@ -196,7 +191,7 @@
|
|
|
196
191
|
/**
|
|
197
192
|
* @template {AssetKind} [K=AssetKind]
|
|
198
193
|
* @typedef {object} ZoeMint
|
|
199
|
-
* @property {() =>
|
|
194
|
+
* @property {() => IssuerRecord<K>} getIssuerRecord
|
|
200
195
|
* @property {(totalToMint: Amount<K>) => void} mintAndEscrow
|
|
201
196
|
* @property {(totalToBurn: Amount<K>) => void} withdrawAndBurn
|
|
202
197
|
* Note that the burning is asynchronous, and so may not have happened by
|
|
@@ -261,7 +256,7 @@
|
|
|
261
256
|
*/
|
|
262
257
|
|
|
263
258
|
/**
|
|
264
|
-
* @typedef {Array<
|
|
259
|
+
* @typedef {Array<IssuerRecord>} IssuerRecords
|
|
265
260
|
*/
|
|
266
261
|
|
|
267
262
|
/**
|
|
@@ -296,7 +291,7 @@
|
|
|
296
291
|
* contract instance
|
|
297
292
|
*
|
|
298
293
|
* @param {Keyword} keyword
|
|
299
|
-
* @param {
|
|
294
|
+
* @param {IssuerRecord} issuerRecord
|
|
300
295
|
* @returns {void}
|
|
301
296
|
*/
|
|
302
297
|
|
package/src/issuerRecord.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export function makeIssuerRecord<K extends AssetKind>(brand: Brand<K>, issuer: Issuer<K>, displayInfo: DisplayInfo<K>):
|
|
2
|
-
export function assertFullIssuerRecord(issuerRecord: IssuerRecord
|
|
3
|
-
import type { IssuerRecord } from '@agoric/ertp';
|
|
1
|
+
export function makeIssuerRecord<K extends AssetKind>(brand: Brand<K>, issuer: Issuer<K>, displayInfo: DisplayInfo<K>): IssuerRecord<K>;
|
|
2
|
+
export function assertFullIssuerRecord(issuerRecord: IssuerRecord): asserts issuerRecord is Required<IssuerRecord>;
|
|
4
3
|
//# 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":"AAaO,iCANkB,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,UACR,MAAM,CAAC,CAAC,CAAC,eACT,WAAW,CAAC,CAAC,CAAC,GACZ,YAAY,CAAC,CAAC,CAAC,CAQxB;AAMG,qDAHI,YAAY,GACV,QAAQ,YAAY,IAAI,QAAQ,CAAC,YAAY,CAAC,CAM1D"}
|
package/src/issuerRecord.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
import { Fail } from '@endo/errors';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* @import {IssuerRecord} from '@agoric/ertp';
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
4
|
/**
|
|
9
5
|
* Put together information about the issuer in a standard format that
|
|
10
6
|
* is synchronously accessible.
|
|
@@ -13,7 +9,7 @@ import { Fail } from '@endo/errors';
|
|
|
13
9
|
* @param {Brand<K>} brand
|
|
14
10
|
* @param {Issuer<K>} issuer
|
|
15
11
|
* @param {DisplayInfo<K>} displayInfo
|
|
16
|
-
* @returns {
|
|
12
|
+
* @returns {IssuerRecord<K>}
|
|
17
13
|
*/
|
|
18
14
|
export const makeIssuerRecord = (brand, issuer, displayInfo) =>
|
|
19
15
|
harden({
|
|
@@ -24,7 +20,7 @@ export const makeIssuerRecord = (brand, issuer, displayInfo) =>
|
|
|
24
20
|
});
|
|
25
21
|
|
|
26
22
|
/**
|
|
27
|
-
* @param {IssuerRecord
|
|
23
|
+
* @param {IssuerRecord} issuerRecord
|
|
28
24
|
* @returns {asserts issuerRecord is Required<IssuerRecord>}
|
|
29
25
|
*/
|
|
30
26
|
export const assertFullIssuerRecord = issuerRecord => {
|
package/src/issuerStorage.d.ts
CHANGED
|
@@ -3,13 +3,12 @@ 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<IssuerRecord>;
|
|
7
|
+
storeIssuerRecord: (issuerRecord: IssuerRecord) => IssuerRecord;
|
|
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';
|
|
15
14
|
//# 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":"AAmBO,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,CAAC,YAAY,CAAC;sCAzBvB,YAAY,KACV,YAAY;;wBAyFA,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"}
|
package/src/issuerStorage.js
CHANGED
|
@@ -10,7 +10,6 @@ const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
|
|
13
|
-
* @import {ZoeIssuerRecord} from '@agoric/zoe';
|
|
14
13
|
*/
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -19,12 +18,12 @@ const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
|
|
|
19
18
|
* @param {import('@agoric/vat-data').Baggage} zcfBaggage
|
|
20
19
|
*/
|
|
21
20
|
export const provideIssuerStorage = zcfBaggage => {
|
|
22
|
-
/** @type {WeakMapStore<Brand,
|
|
21
|
+
/** @type {WeakMapStore<Brand,IssuerRecord>} */
|
|
23
22
|
const brandToIssuerRecord = provideDurableWeakMapStore(
|
|
24
23
|
zcfBaggage,
|
|
25
24
|
'brandToIssuerRecord',
|
|
26
25
|
);
|
|
27
|
-
/** @type {WeakMapStore<Issuer,
|
|
26
|
+
/** @type {WeakMapStore<Issuer,IssuerRecord>} */
|
|
28
27
|
const issuerToIssuerRecord = provideDurableWeakMapStore(
|
|
29
28
|
zcfBaggage,
|
|
30
29
|
'issuerToIssuerRecord',
|
|
@@ -63,8 +62,8 @@ export const provideIssuerStorage = zcfBaggage => {
|
|
|
63
62
|
* to add the issuer again in ZCF.
|
|
64
63
|
*
|
|
65
64
|
*
|
|
66
|
-
* @param {
|
|
67
|
-
* @returns {
|
|
65
|
+
* @param {IssuerRecord} issuerRecord
|
|
66
|
+
* @returns {IssuerRecord}
|
|
68
67
|
*/
|
|
69
68
|
const storeIssuerRecord = issuerRecord => {
|
|
70
69
|
assertInstantiated();
|
|
@@ -88,7 +87,7 @@ export const provideIssuerStorage = zcfBaggage => {
|
|
|
88
87
|
* Otherwise, make and save the issuerRecord.
|
|
89
88
|
*
|
|
90
89
|
* @param {ERef<Issuer>} issuerP
|
|
91
|
-
* @returns {Promise<
|
|
90
|
+
* @returns {Promise<IssuerRecord>}
|
|
92
91
|
*/
|
|
93
92
|
const storeIssuer = async issuerP => {
|
|
94
93
|
assertInstantiated();
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
-
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
4
3
|
*/
|
|
5
4
|
export const KeywordShape: import("@endo/patterns").Matcher;
|
|
6
5
|
/** @type {TypedPattern<InvitationHandle>} */
|
|
@@ -17,8 +16,7 @@ export const PaymentPKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
|
17
16
|
export const IssuerKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
18
17
|
export const IssuerPKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
19
18
|
export const BrandKeywordRecordShape: import("@endo/patterns").Matcher;
|
|
20
|
-
|
|
21
|
-
export const IssuerRecordShape: TypedPattern<ZoeIssuerRecord>;
|
|
19
|
+
export const IssuerRecordShape: import("@endo/patterns").Matcher;
|
|
22
20
|
export namespace TermsShape {
|
|
23
21
|
export { IssuerKeywordRecordShape as issuers };
|
|
24
22
|
export { BrandKeywordRecordShape as brands };
|
|
@@ -40,10 +38,10 @@ export namespace FullProposalShape {
|
|
|
40
38
|
export const ProposalShape: import("@endo/patterns").Matcher;
|
|
41
39
|
export const EmptyProposalShape: import("@endo/patterns").Matcher;
|
|
42
40
|
export function isOnDemandExitRule(exit: any): boolean;
|
|
43
|
-
export function isWaivedExitRule(exit:
|
|
44
|
-
export function isAfterDeadlineExitRule(exit:
|
|
45
|
-
/** @type {TypedPattern<
|
|
46
|
-
export const InvitationElementShape: TypedPattern<
|
|
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>;
|
|
47
45
|
export const OfferHandlerI: import("@endo/patterns").InterfaceGuard<{
|
|
48
46
|
handle: import("@endo/patterns").MethodGuard;
|
|
49
47
|
}>;
|
|
@@ -168,10 +166,8 @@ export const HandleOfferI: import("@endo/patterns").InterfaceGuard<{
|
|
|
168
166
|
}>;
|
|
169
167
|
export namespace PriceQuoteShape {
|
|
170
168
|
export { AmountShape as quoteAmount };
|
|
171
|
-
export let quotePayment: Pattern;
|
|
169
|
+
export let quotePayment: globalThis.Pattern;
|
|
172
170
|
}
|
|
173
171
|
import type { TypedPattern } from '@agoric/internal';
|
|
174
|
-
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
175
|
-
import type { AfterDeadlineExitRule } from '@agoric/zoe';
|
|
176
172
|
import { AmountShape } from '@agoric/ertp';
|
|
177
173
|
//# 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;;GAEG;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,iEAOE;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAGD,8CAA8C;AAC9C,qCADW,aAAa,iBAAiB,CAAC,CAMvC;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;;;;;kCA7X4B,kBAAkB;4BAN1C,cAAc"}
|
package/src/typeGuards.js
CHANGED
|
@@ -15,7 +15,6 @@ import { TimestampShape } from '@agoric/time';
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @import {TypedPattern} from '@agoric/internal';
|
|
18
|
-
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
19
18
|
*/
|
|
20
19
|
|
|
21
20
|
// keywords have an initial cap
|
|
@@ -46,7 +45,6 @@ export const IssuerPKeywordRecordShape = M.recordOf(
|
|
|
46
45
|
);
|
|
47
46
|
export const BrandKeywordRecordShape = M.recordOf(KeywordShape, BrandShape);
|
|
48
47
|
|
|
49
|
-
/** @type {TypedPattern<ZoeIssuerRecord>} */
|
|
50
48
|
export const IssuerRecordShape = M.splitRecord(
|
|
51
49
|
{
|
|
52
50
|
brand: BrandShape,
|
|
@@ -116,7 +114,7 @@ export const isOnDemandExitRule = exit => {
|
|
|
116
114
|
harden(isOnDemandExitRule);
|
|
117
115
|
|
|
118
116
|
/**
|
|
119
|
-
* @param {
|
|
117
|
+
* @param {ExitRule} exit
|
|
120
118
|
* @returns {exit is WaivedExitRule}
|
|
121
119
|
*/
|
|
122
120
|
export const isWaivedExitRule = exit => {
|
|
@@ -126,7 +124,7 @@ export const isWaivedExitRule = exit => {
|
|
|
126
124
|
harden(isWaivedExitRule);
|
|
127
125
|
|
|
128
126
|
/**
|
|
129
|
-
* @param {
|
|
127
|
+
* @param {ExitRule} exit
|
|
130
128
|
* @returns {exit is AfterDeadlineExitRule}
|
|
131
129
|
*/
|
|
132
130
|
export const isAfterDeadlineExitRule = exit => {
|
|
@@ -135,7 +133,7 @@ export const isAfterDeadlineExitRule = exit => {
|
|
|
135
133
|
};
|
|
136
134
|
harden(isAfterDeadlineExitRule);
|
|
137
135
|
|
|
138
|
-
/** @type {TypedPattern<
|
|
136
|
+
/** @type {TypedPattern<InvitationDetails>} */
|
|
139
137
|
export const InvitationElementShape = M.splitRecord({
|
|
140
138
|
description: M.string(),
|
|
141
139
|
handle: InvitationHandleShape,
|
|
@@ -280,7 +278,7 @@ export const ZoeStorageManagerIKit = {
|
|
|
280
278
|
getBundleIDFromInstallation: M.call(InstallationShape).returns(
|
|
281
279
|
M.eref(M.string()),
|
|
282
280
|
),
|
|
283
|
-
installBundle: M.call(BundleShape)
|
|
281
|
+
installBundle: M.call(M.or(InstanceHandleShape, BundleShape))
|
|
284
282
|
.optional(M.string())
|
|
285
283
|
.returns(M.promise()),
|
|
286
284
|
installBundleID: M.call(M.string())
|
|
@@ -313,7 +311,7 @@ export const ZoeStorageManagerIKit = {
|
|
|
313
311
|
InstallationShape,
|
|
314
312
|
M.any(),
|
|
315
313
|
IssuerPKeywordRecordShape,
|
|
316
|
-
InstanceHandleShape,
|
|
314
|
+
M.or(InstanceHandleShape, BundleShape),
|
|
317
315
|
M.or(BundleCapShape, BundleShape),
|
|
318
316
|
M.string(),
|
|
319
317
|
).returns(M.promise()),
|
package/src/types-ambient.d.ts
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alias for RemotableObject
|
|
3
|
+
*/
|
|
4
|
+
type Handle<H extends string> = import("@endo/marshal").RemotableObject<H>;
|
|
5
|
+
type Keyword = string;
|
|
6
|
+
/**
|
|
7
|
+
* - an opaque handle for an invitation
|
|
8
|
+
*/
|
|
9
|
+
type InvitationHandle = Handle<"Invitation">;
|
|
10
|
+
type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
|
|
11
|
+
type IssuerPKeywordRecord = Record<Keyword, import("@endo/far").ERef<Issuer<any>>>;
|
|
12
|
+
type BrandKeywordRecord = Record<Keyword, Brand<any>>;
|
|
13
|
+
type StandardTerms = {
|
|
14
|
+
/**
|
|
15
|
+
* - record with
|
|
16
|
+
* keywords keys, issuer values
|
|
17
|
+
*/
|
|
18
|
+
issuers: IssuerKeywordRecord;
|
|
19
|
+
/**
|
|
20
|
+
* - record with keywords
|
|
21
|
+
* keys, brand values
|
|
22
|
+
*/
|
|
23
|
+
brands: BrandKeywordRecord;
|
|
24
|
+
};
|
|
25
|
+
type AnyTerms = StandardTerms & Record<string, any>;
|
|
26
|
+
type InstanceRecord = {
|
|
27
|
+
installation: import("./zoeService/utils.js").Installation<any>;
|
|
28
|
+
instance: import("./zoeService/utils.js").Instance<any>;
|
|
29
|
+
/**
|
|
30
|
+
* - contract parameters
|
|
31
|
+
*/
|
|
32
|
+
terms: AnyTerms;
|
|
33
|
+
};
|
|
34
|
+
type IssuerRecord<K extends AssetKind = globalThis.AssetKind, M extends import("@endo/patterns").Key = import("@endo/patterns").Key> = {
|
|
35
|
+
brand: Brand<K>;
|
|
36
|
+
issuer: Issuer<K, M>;
|
|
37
|
+
assetKind: K;
|
|
38
|
+
displayInfo?: globalThis.DisplayInfo<K> | undefined;
|
|
39
|
+
};
|
|
40
|
+
type Allocation = Record<Keyword, import("@agoric/ertp/src/types.js").AnyAmount>;
|
|
1
41
|
//# sourceMappingURL=types-ambient.d.ts.map
|
|
@@ -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":";;;YAGsB,CAAC,SAAV,MAAQ,IACR,OAAO,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;eAI1C,MAAM;;;;wBACN,MAAM,CAAC,YAAY,CAAC;2BACpB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;4BAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;0BACtD,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;;;;;;aAK1B,mBAAmB;;;;;YAEnB,kBAAkB;;gBAGnB,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;kBAGlC,OAAO,uBAAuB,EAAE,YAAY,CAAC,GAAG,CAAC;cACjD,OAAO,uBAAuB,EAAE,QAAQ,CAAC,GAAG,CAAC;;;;WAC7C,QAAQ;;kBAII,CAAC,SAAb,SAAU,yBACqB,CAAC,SAAjC,OAAQ,gBAAgB,EAAE,GAAI;WAE7B,KAAK,CAAC,CAAC,CAAC;YACR,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;eACZ,CAAC;;;kBAKF,MAAM,CAAC,OAAO,EAAE,OAAO,2BAA2B,EAAE,SAAS,CAAC"}
|
package/src/types-ambient.js
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
// @jessie-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
)
|
|
3
|
+
/**
|
|
4
|
+
* @template {string} H - the name of the handle
|
|
5
|
+
* @typedef {import('@endo/marshal').RemotableObject<H>} Handle Alias for RemotableObject
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {string} Keyword
|
|
10
|
+
* @typedef {Handle<'Invitation'>} InvitationHandle - an opaque handle for an invitation
|
|
11
|
+
* @typedef {Record<Keyword, Issuer<any>>} IssuerKeywordRecord
|
|
12
|
+
* @typedef {Record<Keyword, import('@endo/far').ERef<Issuer<any>>>} IssuerPKeywordRecord
|
|
13
|
+
* @typedef {Record<Keyword, Brand<any>>} BrandKeywordRecord
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {object} StandardTerms
|
|
18
|
+
* @property {IssuerKeywordRecord} issuers - record with
|
|
19
|
+
* keywords keys, issuer values
|
|
20
|
+
* @property {BrandKeywordRecord} brands - record with keywords
|
|
21
|
+
* keys, brand values
|
|
22
|
+
*
|
|
23
|
+
* @typedef {StandardTerms & Record<string, any>} AnyTerms
|
|
24
|
+
*
|
|
25
|
+
* @typedef {object} InstanceRecord
|
|
26
|
+
* @property {import('./zoeService/utils.js').Installation<any>} installation
|
|
27
|
+
* @property {import('./zoeService/utils.js').Instance<any>} instance
|
|
28
|
+
* @property {AnyTerms} terms - contract parameters
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @template {AssetKind} [K=AssetKind]
|
|
33
|
+
* @template {import('@endo/patterns').Key} [M=import('@endo/patterns').Key] member kind, for Amounts that have member values
|
|
34
|
+
* @typedef {object} IssuerRecord
|
|
35
|
+
* @property {Brand<K>} brand
|
|
36
|
+
* @property {Issuer<K, M>} issuer
|
|
37
|
+
* @property {K} assetKind
|
|
38
|
+
* @property {DisplayInfo<K>} [displayInfo]
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {Record<Keyword, import('@agoric/ertp/src/types.js').AnyAmount>} Allocation
|
|
43
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D"}
|
|
@@ -14,10 +14,6 @@ import {
|
|
|
14
14
|
import { Fail, q } from '@endo/errors';
|
|
15
15
|
import { FeeMintAccessShape } from '../typeGuards.js';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* @import {FeeIssuerConfig, ZoeService} from '@agoric/zoe';
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
17
|
/** @deprecated Redundant. Just omit it. */
|
|
22
18
|
const FEE_MINT_KIT = 'FeeMintKit';
|
|
23
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zoeBaggage: Baggage): import("@endo/exo").Guarded<{
|
|
2
|
-
installBundle(allegedBundle: any, bundleLabel: any): Promise<
|
|
3
|
-
installBundleID(bundleID: any, bundleLabel?: any): Promise<
|
|
2
|
+
installBundle(allegedBundle: any, bundleLabel: any): Promise<Installation<any>>;
|
|
3
|
+
installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<unknown>>;
|
|
4
4
|
unwrapInstallation(installation: any): {
|
|
5
5
|
bundleCap: any;
|
|
6
6
|
bundleID: string;
|
|
@@ -15,5 +15,4 @@ export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zo
|
|
|
15
15
|
getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
|
|
16
16
|
}>;
|
|
17
17
|
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
18
|
-
import type { SourceBundle } from '@agoric/zoe';
|
|
19
18
|
//# sourceMappingURL=installationStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAwBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAwBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA6IjB;6BArJyB,4BAA4B"}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from '@agoric/vat-data';
|
|
8
8
|
import {
|
|
9
9
|
InstallationShape,
|
|
10
|
+
InstanceHandleShape,
|
|
10
11
|
UnwrappedInstallationShape,
|
|
11
12
|
} from '../typeGuards.js';
|
|
12
13
|
|
|
@@ -15,7 +16,6 @@ import {
|
|
|
15
16
|
* @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
|
|
16
17
|
* @import {MapStore} from '@agoric/swingset-liveslots';
|
|
17
18
|
* @import {BundleID, BundleCap} from '@agoric/swingset-vat';
|
|
18
|
-
* @import {SourceBundle} from '@agoric/zoe';
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -80,7 +80,10 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
|
|
|
80
80
|
|
|
81
81
|
const InstallationStorageI = M.interface('InstallationStorage', {
|
|
82
82
|
installBundle: M.call(
|
|
83
|
-
M.
|
|
83
|
+
M.or(
|
|
84
|
+
InstanceHandleShape,
|
|
85
|
+
M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
|
|
86
|
+
),
|
|
84
87
|
)
|
|
85
88
|
.optional(M.string())
|
|
86
89
|
.returns(M.promise()),
|
|
@@ -73,9 +73,9 @@ type ZoeStorageManager = {
|
|
|
73
73
|
getBrands: GetBrands;
|
|
74
74
|
getIssuers: GetIssuers;
|
|
75
75
|
getTerms: import("./utils.js").GetTerms;
|
|
76
|
-
getOfferFilter:
|
|
77
|
-
setOfferFilter:
|
|
78
|
-
getInstallationForInstance:
|
|
76
|
+
getOfferFilter: GetOfferFilter;
|
|
77
|
+
setOfferFilter: SetOfferFilter;
|
|
78
|
+
getInstallationForInstance: GetInstallationForInstance;
|
|
79
79
|
getInstanceAdmin: GetInstanceAdmin;
|
|
80
80
|
unwrapInstallation: UnwrapInstallation;
|
|
81
81
|
getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import("@endo/patterns").Pattern | undefined;
|
|
@@ -86,12 +86,4 @@ type ZoeStorageManager = {
|
|
|
86
86
|
*/
|
|
87
87
|
type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import("@agoric/swingset-vat").CreateVatResults>;
|
|
88
88
|
type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<"nat">;
|
|
89
|
-
import type { FeeMintAccess } from './types.js';
|
|
90
|
-
import type { GetBrands } from './types.js';
|
|
91
|
-
import type { GetBundleIDFromInstallation } from './types.js';
|
|
92
|
-
import type { GetIssuers } from './types.js';
|
|
93
|
-
import type { InstallBundle } from './types.js';
|
|
94
|
-
import type { InstallBundleID } from './types.js';
|
|
95
|
-
import type { SourceBundle } from './types.js';
|
|
96
|
-
import type { InstanceRecord } from './utils.js';
|
|
97
89
|
//# 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":";;;4BAMW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;oDAUrD,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;;mCAKjB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;oBACd,cAAc;gCACd,0BAA0B;sBAC1B,gBAAgB;wBAChB,kBAAkB;mCAClB,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,gBAAgB,EAAE,OAAO,GAAG,SAAS;;;;;;wCAQvF,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @import {FeeMintAccess, GetBrands, GetBundleIDFromInstallation, GetIssuers, InstallBundle, InstallBundleID, SourceBundle} from './types.js';
|
|
6
|
-
* @import {InstanceRecord} from './utils.js';
|
|
7
|
-
*/
|
|
8
2
|
|
|
9
3
|
/**
|
|
10
4
|
* Create a purse for a new issuer
|
|
@@ -133,9 +127,9 @@
|
|
|
133
127
|
* @property {GetBrands} getBrands
|
|
134
128
|
* @property {GetIssuers} getIssuers
|
|
135
129
|
* @property {import('./utils.js').GetTerms} getTerms
|
|
136
|
-
* @property {
|
|
137
|
-
* @property {
|
|
138
|
-
* @property {
|
|
130
|
+
* @property {GetOfferFilter} getOfferFilter
|
|
131
|
+
* @property {SetOfferFilter} setOfferFilter
|
|
132
|
+
* @property {GetInstallationForInstance} getInstallationForInstance
|
|
139
133
|
* @property {GetInstanceAdmin} getInstanceAdmin
|
|
140
134
|
* @property {UnwrapInstallation} unwrapInstallation
|
|
141
135
|
* @property {(invitationHandle: InvitationHandle) => import('@endo/patterns').Pattern | undefined} getProposalShapeForInvitation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function makeInvitationQueryFns(invitationIssuer: any): {
|
|
2
|
-
getInstance:
|
|
3
|
-
getInstallation:
|
|
4
|
-
getInvitationDetails:
|
|
2
|
+
getInstance: GetInstance;
|
|
3
|
+
getInstallation: GetInstallation;
|
|
4
|
+
getInvitationDetails: GetInvitationDetails;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=invitationQueries.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { X, Fail, q, makeError, annotateError } from '@endo/errors';
|
|
|
4
4
|
import { E } from '@endo/eventual-send';
|
|
5
5
|
|
|
6
6
|
export const makeInvitationQueryFns = invitationIssuer => {
|
|
7
|
-
/** @type {
|
|
7
|
+
/** @type {GetInvitationDetails} */
|
|
8
8
|
const getInvitationDetails = async invitationP => {
|
|
9
9
|
const onRejected = reason => {
|
|
10
10
|
const err = makeError(
|
|
@@ -21,11 +21,11 @@ export const makeInvitationQueryFns = invitationIssuer => {
|
|
|
21
21
|
return invAmount.value[0];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
/** @type {
|
|
24
|
+
/** @type {GetInstance} */
|
|
25
25
|
const getInstance = invitation =>
|
|
26
26
|
E.get(getInvitationDetails(invitation)).instance;
|
|
27
27
|
|
|
28
|
-
/** @type {
|
|
28
|
+
/** @type {GetInstallation} */
|
|
29
29
|
const getInstallation = invitation =>
|
|
30
30
|
E.get(getInvitationDetails(invitation)).installation;
|
|
31
31
|
|