@agoric/zoe 0.27.0-upgrade-19-devnet-dev-5428c4d.0 → 0.27.0-upgrade-21-dev-16519b2.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 +305 -305
- 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
package/src/internal-types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ type ZoeSeatAdminKit = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Make the Zoe seat admin, user seat and a notifier
|
|
24
24
|
*/
|
|
25
|
-
type MakeZoeSeatAdminKit = (initialAllocation: Allocation, instanceAdminHelper: InstanceAdminHelper, proposal: ProposalRecord, withdrawFacet: WithdrawFacet, exitObj: ERef<ExitObj>, offerResult?: ERef<unknown>, baggage:
|
|
25
|
+
type MakeZoeSeatAdminKit = (initialAllocation: Allocation, instanceAdminHelper: InstanceAdminHelper, proposal: ProposalRecord, withdrawFacet: WithdrawFacet, exitObj: ERef<ExitObj>, offerResult?: ERef<unknown>, baggage: Baggage) => ZoeSeatAdminKit;
|
|
26
26
|
type ZoeSeatAdminExit = (completion?: Completion) => void;
|
|
27
27
|
type ZoeSeatAdminMethods = {
|
|
28
28
|
replaceAllocation: (allocation: Allocation) => void;
|
|
@@ -31,12 +31,12 @@ type ZoeSeatAdminMethods = {
|
|
|
31
31
|
* called with the reason
|
|
32
32
|
* for calling fail on this seat, where reason is normally an instanceof Error.
|
|
33
33
|
*/
|
|
34
|
-
fail:
|
|
34
|
+
fail: ShutdownWithFailure;
|
|
35
35
|
getExitSubscriber: () => Subscriber<AmountKeywordRecord>;
|
|
36
36
|
};
|
|
37
|
-
type ZoeSeatAdmin =
|
|
37
|
+
type ZoeSeatAdmin = RemotableObject & ZoeSeatAdminMethods;
|
|
38
38
|
type HandleOfferResult = {
|
|
39
|
-
offerResultPromise: Promise<
|
|
39
|
+
offerResultPromise: Promise<Passable>;
|
|
40
40
|
exitObj: ExitObj;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
@@ -56,7 +56,7 @@ type InstanceAdmin = {
|
|
|
56
56
|
getOfferFilter: () => string[];
|
|
57
57
|
getInstallation: () => Installation;
|
|
58
58
|
exitAllSeats: (completion: Completion) => void;
|
|
59
|
-
failAllSeats:
|
|
59
|
+
failAllSeats: ShutdownWithFailure;
|
|
60
60
|
stopAcceptingOffers: () => void;
|
|
61
61
|
isBlocked: (string: string) => boolean;
|
|
62
62
|
initDelayedState: (handleOfferObj: HandleOfferObj, publicFacet: unknown) => void;
|
|
@@ -73,13 +73,13 @@ 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;
|
|
80
80
|
replaceAllocations: ReplaceAllocations;
|
|
81
81
|
exitAllSeats: (completion: Completion) => void;
|
|
82
|
-
failAllSeats:
|
|
82
|
+
failAllSeats: ShutdownWithFailure;
|
|
83
83
|
exitSeat: (seatHandle: SeatHandle, completion: Completion) => void;
|
|
84
84
|
failSeat: (seatHandle: SeatHandle, reason: Error) => void;
|
|
85
85
|
stopAcceptingOffers: () => void;
|
|
@@ -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,19 @@ type InstanceState = {
|
|
|
162
162
|
getBrands: () => BrandKeywordRecord;
|
|
163
163
|
assertUniqueKeyword: (keyword: Keyword) => void;
|
|
164
164
|
};
|
|
165
|
+
import type { RemotableObject } from '@endo/pass-style';
|
|
166
|
+
import type { Passable } from '@endo/pass-style';
|
|
167
|
+
import type { Pattern } from '@endo/patterns';
|
|
168
|
+
import type { ShutdownWithFailure } from '@agoric/swingset-vat';
|
|
169
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
170
|
+
import type { IssuerOptionsRecord } from '@agoric/ertp';
|
|
171
|
+
import type { IssuerRecord } from '@agoric/ertp';
|
|
172
|
+
import type { Allocation } from './types-index.js';
|
|
173
|
+
import type { PaymentPKeywordRecord } from './types-index.js';
|
|
174
|
+
import type { UserSeat } from './types-index.js';
|
|
175
|
+
import type { Completion } from './types-index.js';
|
|
176
|
+
import type { ZoeIssuerRecord } from './types-index.js';
|
|
177
|
+
import type { InvitationHandle } from './types.js';
|
|
178
|
+
import type { BrandKeywordRecord } from './types.js';
|
|
179
|
+
import type { AnyTerms } from './types.js';
|
|
165
180
|
//# 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,6 +1,16 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
/// <reference types="@agoric/ertp/exported" />
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @import {RemotableObject, Passable} from '@endo/pass-style';
|
|
6
|
+
* @import {Pattern} from '@endo/patterns';
|
|
7
|
+
* @import {ShutdownWithFailure} from '@agoric/swingset-vat';
|
|
8
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
9
|
+
* @import {IssuerOptionsRecord, IssuerRecord} from '@agoric/ertp';
|
|
10
|
+
* @import {Allocation, PaymentPKeywordRecord, UserSeat, Completion, ZoeIssuerRecord} from './types-index.js';
|
|
11
|
+
* @import {InvitationHandle, BrandKeywordRecord, AnyTerms} from './types.js';
|
|
12
|
+
*/
|
|
13
|
+
|
|
4
14
|
/**
|
|
5
15
|
* @typedef {object} SeatData
|
|
6
16
|
* @property {ProposalRecord} proposal
|
|
@@ -19,7 +29,7 @@
|
|
|
19
29
|
|
|
20
30
|
/**
|
|
21
31
|
* @typedef WithdrawFacet
|
|
22
|
-
* @property {(allocation:Allocation) => PaymentPKeywordRecord} withdrawPayments
|
|
32
|
+
* @property {(allocation: Allocation) => PaymentPKeywordRecord} withdrawPayments
|
|
23
33
|
*/
|
|
24
34
|
|
|
25
35
|
/**
|
|
@@ -43,7 +53,7 @@
|
|
|
43
53
|
* @param {WithdrawFacet} withdrawFacet
|
|
44
54
|
* @param {ERef<ExitObj>} exitObj
|
|
45
55
|
* @param {ERef<unknown>} [offerResult]
|
|
46
|
-
* @param {
|
|
56
|
+
* @param {Baggage} baggage
|
|
47
57
|
* @returns {ZoeSeatAdminKit}
|
|
48
58
|
*/
|
|
49
59
|
|
|
@@ -57,12 +67,12 @@
|
|
|
57
67
|
* @typedef ZoeSeatAdminMethods
|
|
58
68
|
* @property {(allocation: Allocation) => void} replaceAllocation
|
|
59
69
|
* @property {ZoeSeatAdminExit} exit
|
|
60
|
-
* @property {
|
|
70
|
+
* @property {ShutdownWithFailure} fail called with the reason
|
|
61
71
|
* for calling fail on this seat, where reason is normally an instanceof Error.
|
|
62
72
|
* @property {() => Subscriber<AmountKeywordRecord>} getExitSubscriber
|
|
63
73
|
*/
|
|
64
74
|
/**
|
|
65
|
-
* @typedef {
|
|
75
|
+
* @typedef {RemotableObject & ZoeSeatAdminMethods} ZoeSeatAdmin
|
|
66
76
|
*/
|
|
67
77
|
|
|
68
78
|
/**
|
|
@@ -71,7 +81,7 @@
|
|
|
71
81
|
|
|
72
82
|
/**
|
|
73
83
|
* @typedef {object} HandleOfferResult
|
|
74
|
-
* @property {Promise<
|
|
84
|
+
* @property {Promise<Passable>} offerResultPromise
|
|
75
85
|
* @property {ExitObj} exitObj
|
|
76
86
|
*/
|
|
77
87
|
|
|
@@ -96,7 +106,7 @@
|
|
|
96
106
|
* @property {() => string[]} getOfferFilter
|
|
97
107
|
* @property {() => Installation} getInstallation
|
|
98
108
|
* @property {(completion: Completion) => void} exitAllSeats
|
|
99
|
-
* @property {
|
|
109
|
+
* @property {ShutdownWithFailure} failAllSeats
|
|
100
110
|
* @property {() => void} stopAcceptingOffers
|
|
101
111
|
* @property {(string: string) => boolean} isBlocked
|
|
102
112
|
* @property {(handleOfferObj: HandleOfferObj, publicFacet: unknown) => void} initDelayedState
|
|
@@ -128,13 +138,13 @@
|
|
|
128
138
|
* @property {ZoeInstanceAdminMakeInvitation} makeInvitation
|
|
129
139
|
* @property {<I extends Issuer>(issuerP: ERef<I>,
|
|
130
140
|
* keyword: Keyword
|
|
131
|
-
* ) => Promise<I extends Issuer<infer K, infer M> ?
|
|
141
|
+
* ) => Promise<I extends Issuer<infer K, infer M> ? ZoeIssuerRecord<K, M> : never>} saveIssuer
|
|
132
142
|
* @property {MakeZoeMint} makeZoeMint
|
|
133
143
|
* @property {RegisterFeeMint} registerFeeMint
|
|
134
144
|
* @property {MakeNoEscrowSeat} makeNoEscrowSeat
|
|
135
145
|
* @property {ReplaceAllocations} replaceAllocations
|
|
136
146
|
* @property {(completion: Completion) => void} exitAllSeats
|
|
137
|
-
* @property {
|
|
147
|
+
* @property {ShutdownWithFailure} failAllSeats
|
|
138
148
|
* @property {(seatHandle: SeatHandle, completion: Completion) => void} exitSeat
|
|
139
149
|
* @property {(seatHandle: SeatHandle, reason: Error) => void} failSeat
|
|
140
150
|
* @property {() => void} stopAcceptingOffers
|
|
@@ -164,7 +174,7 @@
|
|
|
164
174
|
* @param {Keyword} keyword
|
|
165
175
|
* @param {AssetKind} [assetKind]
|
|
166
176
|
* @param {AdditionalDisplayInfo} [displayInfo]
|
|
167
|
-
* @param {
|
|
177
|
+
* @param {IssuerOptionsRecord} [options]
|
|
168
178
|
* @returns {ZoeMint}
|
|
169
179
|
*/
|
|
170
180
|
|
|
@@ -256,7 +266,7 @@
|
|
|
256
266
|
*/
|
|
257
267
|
|
|
258
268
|
/**
|
|
259
|
-
* @typedef {Array<
|
|
269
|
+
* @typedef {Array<ZoeIssuerRecord>} IssuerRecords
|
|
260
270
|
*/
|
|
261
271
|
|
|
262
272
|
/**
|
|
@@ -291,7 +301,7 @@
|
|
|
291
301
|
* contract instance
|
|
292
302
|
*
|
|
293
303
|
* @param {Keyword} keyword
|
|
294
|
-
* @param {
|
|
304
|
+
* @param {ZoeIssuerRecord} issuerRecord
|
|
295
305
|
* @returns {void}
|
|
296
306
|
*/
|
|
297
307
|
|
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"}
|
package/src/typeGuards.js
CHANGED
|
@@ -15,6 +15,7 @@ import { TimestampShape } from '@agoric/time';
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @import {TypedPattern} from '@agoric/internal';
|
|
18
|
+
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
21
|
// keywords have an initial cap
|
|
@@ -45,6 +46,7 @@ export const IssuerPKeywordRecordShape = M.recordOf(
|
|
|
45
46
|
);
|
|
46
47
|
export const BrandKeywordRecordShape = M.recordOf(KeywordShape, BrandShape);
|
|
47
48
|
|
|
49
|
+
/** @type {TypedPattern<ZoeIssuerRecord>} */
|
|
48
50
|
export const IssuerRecordShape = M.splitRecord(
|
|
49
51
|
{
|
|
50
52
|
brand: BrandShape,
|
|
@@ -114,7 +116,7 @@ export const isOnDemandExitRule = exit => {
|
|
|
114
116
|
harden(isOnDemandExitRule);
|
|
115
117
|
|
|
116
118
|
/**
|
|
117
|
-
* @param {ExitRule} exit
|
|
119
|
+
* @param {import('./types-index').ExitRule} exit
|
|
118
120
|
* @returns {exit is WaivedExitRule}
|
|
119
121
|
*/
|
|
120
122
|
export const isWaivedExitRule = exit => {
|
|
@@ -124,7 +126,7 @@ export const isWaivedExitRule = exit => {
|
|
|
124
126
|
harden(isWaivedExitRule);
|
|
125
127
|
|
|
126
128
|
/**
|
|
127
|
-
* @param {ExitRule} exit
|
|
129
|
+
* @param {import('./types-index').ExitRule} exit
|
|
128
130
|
* @returns {exit is AfterDeadlineExitRule}
|
|
129
131
|
*/
|
|
130
132
|
export const isAfterDeadlineExitRule = exit => {
|
|
@@ -133,7 +135,7 @@ export const isAfterDeadlineExitRule = exit => {
|
|
|
133
135
|
};
|
|
134
136
|
harden(isAfterDeadlineExitRule);
|
|
135
137
|
|
|
136
|
-
/** @type {TypedPattern<InvitationDetails>} */
|
|
138
|
+
/** @type {TypedPattern<import('./types-index').InvitationDetails>} */
|
|
137
139
|
export const InvitationElementShape = M.splitRecord({
|
|
138
140
|
description: M.string(),
|
|
139
141
|
handle: InvitationHandleShape,
|
|
@@ -278,7 +280,7 @@ export const ZoeStorageManagerIKit = {
|
|
|
278
280
|
getBundleIDFromInstallation: M.call(InstallationShape).returns(
|
|
279
281
|
M.eref(M.string()),
|
|
280
282
|
),
|
|
281
|
-
installBundle: M.call(
|
|
283
|
+
installBundle: M.call(BundleShape)
|
|
282
284
|
.optional(M.string())
|
|
283
285
|
.returns(M.promise()),
|
|
284
286
|
installBundleID: M.call(M.string())
|
|
@@ -311,7 +313,7 @@ export const ZoeStorageManagerIKit = {
|
|
|
311
313
|
InstallationShape,
|
|
312
314
|
M.any(),
|
|
313
315
|
IssuerPKeywordRecordShape,
|
|
314
|
-
|
|
316
|
+
InstanceHandleShape,
|
|
315
317
|
M.or(BundleCapShape, BundleShape),
|
|
316
318
|
M.string(),
|
|
317
319
|
).returns(M.promise()),
|
package/src/types-ambient.d.ts
CHANGED
|
@@ -1,41 +1 @@
|
|
|
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>;
|
|
41
1
|
//# 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":""}
|
package/src/types-ambient.js
CHANGED
|
@@ -1,43 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @file @deprecated */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
*/
|
|
3
|
+
console.error(
|
|
4
|
+
'NOTICE: src/types-ambient.js no longer provides types; use explicit imports or the top level `/exported.js`',
|
|
5
|
+
);
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Brand, Issuer } from '@agoric/ertp';
|
|
2
|
+
import type { RemotableObject } from '@endo/pass-style';
|
|
3
|
+
/**
|
|
4
|
+
* Alias for RemotableObject
|
|
5
|
+
*/
|
|
6
|
+
export type Handle<H extends string> = RemotableObject<H>;
|
|
7
|
+
/** Must start with a capital letter. */
|
|
8
|
+
export type Keyword = string;
|
|
9
|
+
/**
|
|
10
|
+
* - an opaque handle for an invitation
|
|
11
|
+
*/
|
|
12
|
+
export type InvitationHandle = Handle<'Invitation'>;
|
|
13
|
+
export type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
|
|
14
|
+
export type IssuerPKeywordRecord = Record<Keyword, import('@endo/far').ERef<Issuer<any>>>;
|
|
15
|
+
export type BrandKeywordRecord = Record<Keyword, Brand<any>>;
|
|
16
|
+
export type StandardTerms = {
|
|
17
|
+
/**
|
|
18
|
+
* - record with
|
|
19
|
+
* keywords keys, issuer values
|
|
20
|
+
*/
|
|
21
|
+
issuers: IssuerKeywordRecord;
|
|
22
|
+
/**
|
|
23
|
+
* - record with keywords
|
|
24
|
+
* keys, brand values
|
|
25
|
+
*/
|
|
26
|
+
brands: BrandKeywordRecord;
|
|
27
|
+
};
|
|
28
|
+
export type AnyTerms = StandardTerms & Record<string, any>;
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAK1D,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,oBAAoB,GAAG,MAAM,CACvC,OAAO,EACP,OAAO,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CACtC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,OAAO,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Brand, Issuer } from '@agoric/ertp';
|
|
2
|
+
import type { RemotableObject } from '@endo/pass-style';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Alias for RemotableObject
|
|
6
|
+
*/
|
|
7
|
+
export type Handle<H extends string> = RemotableObject<H>;
|
|
8
|
+
|
|
9
|
+
// Typing this as Capitalize<string> would be more accurate but requires
|
|
10
|
+
// frequent casting. Revisit once .ts syntax is more common. Even then,
|
|
11
|
+
// may not be worth the effort since Zoe 2 probably will not have keywords.
|
|
12
|
+
/** Must start with a capital letter. */
|
|
13
|
+
export type Keyword = string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* - an opaque handle for an invitation
|
|
17
|
+
*/
|
|
18
|
+
export type InvitationHandle = Handle<'Invitation'>;
|
|
19
|
+
export type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
|
|
20
|
+
export type IssuerPKeywordRecord = Record<
|
|
21
|
+
Keyword,
|
|
22
|
+
import('@endo/far').ERef<Issuer<any>>
|
|
23
|
+
>;
|
|
24
|
+
export type BrandKeywordRecord = Record<Keyword, Brand<any>>;
|
|
25
|
+
export type StandardTerms = {
|
|
26
|
+
/**
|
|
27
|
+
* - record with
|
|
28
|
+
* keywords keys, issuer values
|
|
29
|
+
*/
|
|
30
|
+
issuers: IssuerKeywordRecord;
|
|
31
|
+
/**
|
|
32
|
+
* - record with keywords
|
|
33
|
+
* keys, brand values
|
|
34
|
+
*/
|
|
35
|
+
brands: BrandKeywordRecord;
|
|
36
|
+
};
|
|
37
|
+
export type AnyTerms = StandardTerms & Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"AAoBO,8CAFI,OAAO,kBAAkB,EAAE,OAAO;;;;;EA8G5C"}
|
|
@@ -5,12 +5,11 @@ import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
|
|
|
5
5
|
import { provideDurableWeakMapStore } from '@agoric/vat-data';
|
|
6
6
|
|
|
7
7
|
/// <reference path="./types.js" />
|
|
8
|
-
import './internal-types.js';
|
|
9
8
|
|
|
10
9
|
import { cleanKeywords } from '../cleanProposal.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
|
-
* @import {
|
|
12
|
+
* @import {WeakMapStore} from '@agoric/store';
|
|
14
13
|
*/
|
|
15
14
|
|
|
16
15
|
/**
|