@agoric/inter-protocol 0.16.2-dev-57802f9.0 → 0.16.2-other-dev-70beeb7.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/CHANGELOG.md +1041 -0
- package/package.json +30 -33
- package/scripts/add-collateral-core.js +112 -0
- package/scripts/build-bundles.js +21 -5
- package/scripts/deploy-contracts.js +100 -0
- package/scripts/init-core.js +198 -0
- package/scripts/invite-committee-core.js +42 -0
- package/scripts/manual-price-feed.js +117 -0
- package/scripts/price-feed-core.js +104 -0
- package/scripts/start-local-chain.sh +84 -0
- package/src/auction/auctionBook.js +59 -74
- package/src/auction/auctioneer.js +44 -56
- package/src/auction/offerBook.js +11 -12
- package/src/auction/params.js +5 -3
- package/src/auction/scheduleMath.js +13 -13
- package/src/auction/scheduler.js +32 -32
- package/src/auction/sortedOffers.js +7 -8
- package/src/auction/util.js +4 -4
- package/src/clientSupport.js +96 -152
- package/src/contractSupport.js +5 -5
- package/src/econCommitteeCharter.js +17 -18
- package/src/feeDistributor.js +33 -34
- package/src/interest.js +14 -20
- package/src/price/fluxAggregatorContract.js +45 -51
- package/src/price/fluxAggregatorKit.js +33 -48
- package/src/price/priceOracleKit.js +13 -11
- package/src/price/roundsManager.js +64 -52
- package/src/proposals/addAssetToVault.js +6 -15
- package/src/proposals/committee-proposal.js +27 -21
- package/src/proposals/core-proposal.js +7 -7
- package/src/proposals/econ-behaviors.js +32 -57
- package/src/proposals/price-feed-proposal.js +34 -66
- package/src/proposals/startEconCommittee.js +1 -1
- package/src/proposals/startPSM.js +22 -32
- package/src/proposals/utils.js +7 -26
- package/src/psm/psm.js +63 -69
- package/src/reserve/assetReserve.js +18 -27
- package/src/reserve/assetReserveKit.js +22 -14
- package/src/typeGuards.js +13 -0
- package/src/vaultFactory/liquidation.js +17 -30
- package/src/vaultFactory/math.js +9 -8
- package/src/vaultFactory/orderedVaultStore.js +9 -6
- package/src/vaultFactory/params.js +18 -24
- package/src/vaultFactory/prioritizedVaults.js +2 -2
- package/src/vaultFactory/proceeds.js +18 -24
- package/src/vaultFactory/storeUtils.js +12 -8
- package/src/vaultFactory/types.js +28 -38
- package/src/vaultFactory/vault.js +89 -88
- package/src/vaultFactory/vaultDirector.js +44 -35
- package/src/vaultFactory/vaultFactory.js +26 -33
- package/src/vaultFactory/vaultHolder.js +13 -8
- package/src/vaultFactory/vaultKit.js +2 -3
- package/src/vaultFactory/vaultManager.js +120 -138
- package/src/auction/auctionBook.d.ts +0 -83
- package/src/auction/auctionBook.d.ts.map +0 -1
- package/src/auction/auctioneer.d.ts +0 -75
- package/src/auction/auctioneer.d.ts.map +0 -1
- package/src/auction/offerBook.d.ts +0 -72
- package/src/auction/offerBook.d.ts.map +0 -1
- package/src/auction/params.d.ts +0 -142
- package/src/auction/params.d.ts.map +0 -1
- package/src/auction/scheduleMath.d.ts +0 -4
- package/src/auction/scheduleMath.d.ts.map +0 -1
- package/src/auction/scheduler.d.ts +0 -49
- package/src/auction/scheduler.d.ts.map +0 -1
- package/src/auction/sortedOffers.d.ts +0 -8
- package/src/auction/sortedOffers.d.ts.map +0 -1
- package/src/auction/util.d.ts +0 -30
- package/src/auction/util.d.ts.map +0 -1
- package/src/clientSupport.d.ts +0 -167
- package/src/clientSupport.d.ts.map +0 -1
- package/src/collectFees.d.ts +0 -2
- package/src/collectFees.d.ts.map +0 -1
- package/src/contractSupport.d.ts +0 -33
- package/src/contractSupport.d.ts.map +0 -1
- package/src/econCommitteeCharter.d.ts +0 -41
- package/src/econCommitteeCharter.d.ts.map +0 -1
- package/src/feeDistributor.d.ts +0 -212
- package/src/feeDistributor.d.ts.map +0 -1
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/interest-math.d.ts +0 -3
- package/src/interest-math.d.ts.map +0 -1
- package/src/interest.d.ts +0 -29
- package/src/interest.d.ts.map +0 -1
- package/src/price/fluxAggregatorContract.d.ts +0 -112
- package/src/price/fluxAggregatorContract.d.ts.map +0 -1
- package/src/price/fluxAggregatorKit.d.ts +0 -155
- package/src/price/fluxAggregatorKit.d.ts.map +0 -1
- package/src/price/priceOracleKit.d.ts +0 -52
- package/src/price/priceOracleKit.d.ts.map +0 -1
- package/src/price/roundsManager.d.ts +0 -330
- package/src/price/roundsManager.d.ts.map +0 -1
- package/src/proposals/addAssetToVault.d.ts +0 -143
- package/src/proposals/addAssetToVault.d.ts.map +0 -1
- package/src/proposals/committee-proposal.d.ts +0 -113
- package/src/proposals/committee-proposal.d.ts.map +0 -1
- package/src/proposals/core-proposal.d.ts +0 -149
- package/src/proposals/core-proposal.d.ts.map +0 -1
- package/src/proposals/econ-behaviors.d.ts +0 -201
- package/src/proposals/econ-behaviors.d.ts.map +0 -1
- package/src/proposals/price-feed-proposal.d.ts +0 -82
- package/src/proposals/price-feed-proposal.d.ts.map +0 -1
- package/src/proposals/startEconCommittee.d.ts +0 -34
- package/src/proposals/startEconCommittee.d.ts.map +0 -1
- package/src/proposals/startPSM.d.ts +0 -61
- package/src/proposals/startPSM.d.ts.map +0 -1
- package/src/proposals/utils.d.ts +0 -15
- package/src/proposals/utils.d.ts.map +0 -1
- package/src/provisionPool.d.ts +0 -165
- package/src/provisionPool.d.ts.map +0 -1
- package/src/provisionPool.js +0 -119
- package/src/provisionPoolKit.d.ts +0 -379
- package/src/provisionPoolKit.d.ts.map +0 -1
- package/src/provisionPoolKit.js +0 -461
- package/src/psm/psm.d.ts +0 -178
- package/src/psm/psm.d.ts.map +0 -1
- package/src/psm/types.d.ts +0 -2
- package/src/psm/types.d.ts.map +0 -1
- package/src/reserve/assetReserve.d.ts +0 -44
- package/src/reserve/assetReserve.d.ts.map +0 -1
- package/src/reserve/assetReserveKit.d.ts +0 -114
- package/src/reserve/assetReserveKit.d.ts.map +0 -1
- package/src/reserve/params.d.ts +0 -10
- package/src/reserve/params.d.ts.map +0 -1
- package/src/tokens.d.ts +0 -3
- package/src/tokens.d.ts.map +0 -1
- package/src/tokens.js +0 -5
- package/src/vaultFactory/burn.d.ts +0 -2
- package/src/vaultFactory/burn.d.ts.map +0 -1
- package/src/vaultFactory/liquidation.d.ts +0 -24
- package/src/vaultFactory/liquidation.d.ts.map +0 -1
- package/src/vaultFactory/math.d.ts +0 -10
- package/src/vaultFactory/math.d.ts.map +0 -1
- package/src/vaultFactory/orderedVaultStore.d.ts +0 -94
- package/src/vaultFactory/orderedVaultStore.d.ts.map +0 -1
- package/src/vaultFactory/params.d.ts +0 -159
- package/src/vaultFactory/params.d.ts.map +0 -1
- package/src/vaultFactory/prioritizedVaults.d.ts +0 -279
- package/src/vaultFactory/prioritizedVaults.d.ts.map +0 -1
- package/src/vaultFactory/proceeds.d.ts +0 -34
- package/src/vaultFactory/proceeds.d.ts.map +0 -1
- package/src/vaultFactory/storeUtils.d.ts +0 -25
- package/src/vaultFactory/storeUtils.d.ts.map +0 -1
- package/src/vaultFactory/type-imports.d.ts +0 -2
- package/src/vaultFactory/type-imports.d.ts.map +0 -1
- package/src/vaultFactory/types.d.ts +0 -137
- package/src/vaultFactory/types.d.ts.map +0 -1
- package/src/vaultFactory/vault.d.ts +0 -529
- package/src/vaultFactory/vault.d.ts.map +0 -1
- package/src/vaultFactory/vaultDirector.d.ts +0 -560
- package/src/vaultFactory/vaultDirector.d.ts.map +0 -1
- package/src/vaultFactory/vaultFactory.d.ts +0 -162
- package/src/vaultFactory/vaultFactory.d.ts.map +0 -1
- package/src/vaultFactory/vaultHolder.d.ts +0 -201
- package/src/vaultFactory/vaultHolder.d.ts.map +0 -1
- package/src/vaultFactory/vaultKit.d.ts +0 -32
- package/src/vaultFactory/vaultKit.d.ts.map +0 -1
- package/src/vaultFactory/vaultManager.d.ts +0 -554
- package/src/vaultFactory/vaultManager.d.ts.map +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export function distributeProportionalSharesWithLimits(unsoldCollateral: Amount<'nat'>, proceeds: Amount<'nat'>, deposits: {
|
|
2
|
-
seat: ZCFSeat;
|
|
3
|
-
amount: Amount<'nat'>;
|
|
4
|
-
goal: Amount<'nat'>;
|
|
5
|
-
}[], collateralSeat: ZCFSeat, bidHoldingSeat: ZCFSeat, collateralKeyword: string, reserveSeat: ZCFSeat, brand: Brand): TransferPart[];
|
|
6
|
-
export function start(zcf: ZCF<GovernanceTerms<{
|
|
7
|
-
Electorate: "invitation";
|
|
8
|
-
StartFrequency: "relativeTime";
|
|
9
|
-
ClockStep: "relativeTime";
|
|
10
|
-
StartingRate: "nat";
|
|
11
|
-
LowestRate: "nat";
|
|
12
|
-
DiscountStep: "nat";
|
|
13
|
-
AuctionStartDelay: "relativeTime";
|
|
14
|
-
PriceLockPeriod: "relativeTime";
|
|
15
|
-
}> & {
|
|
16
|
-
timerService: import('@agoric/time/src/types').TimerService;
|
|
17
|
-
reservePublicFacet: AssetReservePublicFacet;
|
|
18
|
-
priceAuthority: PriceAuthority;
|
|
19
|
-
}>, privateArgs: {
|
|
20
|
-
initialPoserInvitation: Invitation;
|
|
21
|
-
storageNode: StorageNode;
|
|
22
|
-
marshaller: Marshaller;
|
|
23
|
-
}, baggage: Baggage): Promise<{
|
|
24
|
-
publicFacet: GovernedPublicFacet<{
|
|
25
|
-
getElectorate: () => Amount<"set">;
|
|
26
|
-
getStartFrequency: () => import("@agoric/time/src/types").RelativeTime;
|
|
27
|
-
getClockStep: () => import("@agoric/time/src/types").RelativeTime;
|
|
28
|
-
getStartingRate: () => bigint;
|
|
29
|
-
getLowestRate: () => bigint;
|
|
30
|
-
getDiscountStep: () => bigint;
|
|
31
|
-
getAuctionStartDelay: () => import("@agoric/time/src/types").RelativeTime;
|
|
32
|
-
getPriceLockPeriod: () => import("@agoric/time/src/types").RelativeTime;
|
|
33
|
-
/** @param {Brand<'nat'>} collateralBrand */
|
|
34
|
-
makeBidInvitation(collateralBrand: Brand<'nat'>): Promise<Invitation<R, A>>;
|
|
35
|
-
getSchedules(): {
|
|
36
|
-
liveAuctionSchedule: import("./scheduler.js").Schedule | null;
|
|
37
|
-
nextAuctionSchedule: import("./scheduler.js").Schedule | null;
|
|
38
|
-
};
|
|
39
|
-
getScheduleUpdates(): Subscriber<import("./scheduler.js").ScheduleNotification>;
|
|
40
|
-
getBookDataUpdates(brand: any): Subscriber<import("./auctionBook.js").BookDataNotification>;
|
|
41
|
-
getPublicTopics(brand: any): {
|
|
42
|
-
bookData: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("./auctionBook.js").BookDataNotification>;
|
|
43
|
-
} | {
|
|
44
|
-
schedule: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("./scheduler.js").ScheduleNotification>;
|
|
45
|
-
};
|
|
46
|
-
makeDepositInvitation: () => Promise<Invitation<R, A>>;
|
|
47
|
-
}>;
|
|
48
|
-
creatorFacet: GovernedCreatorFacet<{
|
|
49
|
-
/**
|
|
50
|
-
* @param {Issuer} issuer
|
|
51
|
-
* @param {Keyword} kwd
|
|
52
|
-
*/
|
|
53
|
-
addBrand(issuer: Issuer, kwd: Keyword): Promise<void>;
|
|
54
|
-
/** @returns {Promise<import('./scheduler.js').FullSchedule>} */
|
|
55
|
-
getSchedule(): Promise<import('./scheduler.js').FullSchedule>;
|
|
56
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
57
|
-
/**
|
|
58
|
-
* @param {Issuer} issuer
|
|
59
|
-
* @param {Keyword} kwd
|
|
60
|
-
*/
|
|
61
|
-
addBrand(issuer: Issuer, kwd: Keyword): Promise<void>;
|
|
62
|
-
/** @returns {Promise<import('./scheduler.js').FullSchedule>} */
|
|
63
|
-
getSchedule(): Promise<import('./scheduler.js').FullSchedule>;
|
|
64
|
-
}>>;
|
|
65
|
-
}>;
|
|
66
|
-
/** @typedef {ContractOf<typeof start>} AuctioneerContract */
|
|
67
|
-
/** @typedef {AuctioneerContract['publicFacet']} AuctioneerPublicFacet */
|
|
68
|
-
/** @typedef {AuctioneerContract['creatorFacet']} AuctioneerCreatorFacet */
|
|
69
|
-
export const AuctionPFShape: any;
|
|
70
|
-
export type Baggage = import('@agoric/vat-data').Baggage;
|
|
71
|
-
export type AuctioneerContract = ContractOf<typeof start>;
|
|
72
|
-
export type AuctioneerPublicFacet = AuctioneerContract['publicFacet'];
|
|
73
|
-
export type AuctioneerCreatorFacet = AuctioneerContract['creatorFacet'];
|
|
74
|
-
import { auctioneerParamTypes } from './params.js';
|
|
75
|
-
//# sourceMappingURL=auctioneer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auctioneer.d.ts","sourceRoot":"","sources":["auctioneer.js"],"names":[],"mappings":"AA8KO,yEAXI,OAAO,KAAK,CAAC,YACb,OAAO,KAAK,CAAC,YACb;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAC;IAAC,IAAI,EAAE,OAAO,KAAK,CAAC,CAAA;CAAE,EAAE,kBAC/D,OAAO,kBACP,OAAO,qBAEP,MAAM,eAEN,OAAO,SACP,KAAK,kBAgNf;AAiBM;;;;;;;;;;kBAZc,OAAO,wBAAwB,EAAE,YAAY;wBACvC,uBAAuB;oBAC3B,cAAc;iBAG1B;IACV,sBAA0B,EAAE,UAAU,CAAC;IACvC,WAAe,EAAE,WAAW,CAAC;IAC7B,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;;;;;;;;QAyOZ,4CAA4C;2CAAhC,MAAM,KAAK,CAAC;;;;;;;;;;;;;;;QA+DxB;;;WAGG;yBAFQ,MAAM,OACN,OAAO;QAwBlB,gEAAgE;uBAAlD,QAAQ,OAAO,gBAAgB,EAAE,YAAY,CAAC;;QA1B5D;;;WAGG;yBAFQ,MAAM,OACN,OAAO;QAwBlB,gEAAgE;uBAAlD,QAAQ,OAAO,gBAAgB,EAAE,YAAY,CAAC;;GAQjE;AAED,6DAA6D;AAC7D,yEAAyE;AACzE,2EAA2E;AAE3E,iCAAkE;sBAtrBpD,OAAO,kBAAkB,EAAE,OAAO;iCAkrBlC,WAAW,YAAY,CAAC;oCACxB,kBAAkB,CAAC,aAAa,CAAC;qCACjC,kBAAkB,CAAC,cAAc,CAAC;qCAxrBX,aAAa"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export function prepareScaledBidBook(baggage: Baggage): (bidScalingPattern: any, collateralBrand: Brand<AssetKind>) => {
|
|
2
|
-
/**
|
|
3
|
-
* @param {ZCFSeat} seat
|
|
4
|
-
* @param {Ratio} bidScaling
|
|
5
|
-
* @param {Amount<'nat'>} wanted
|
|
6
|
-
* @param {boolean} exitAfterBuy
|
|
7
|
-
*/
|
|
8
|
-
add(seat: ZCFSeat, bidScaling: Ratio, wanted: Amount<'nat'>, exitAfterBuy: boolean): string;
|
|
9
|
-
/** @param {Ratio} bidScaling */
|
|
10
|
-
offersAbove(bidScaling: Ratio): [string, BidderRecord][];
|
|
11
|
-
hasOrders(): boolean;
|
|
12
|
-
delete(key: any): void;
|
|
13
|
-
updateReceived(key: any, sold: any): void;
|
|
14
|
-
exitAllSeats(): void;
|
|
15
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
16
|
-
/**
|
|
17
|
-
* @param {ZCFSeat} seat
|
|
18
|
-
* @param {Ratio} bidScaling
|
|
19
|
-
* @param {Amount<'nat'>} wanted
|
|
20
|
-
* @param {boolean} exitAfterBuy
|
|
21
|
-
*/
|
|
22
|
-
add(seat: ZCFSeat, bidScaling: Ratio, wanted: Amount<'nat'>, exitAfterBuy: boolean): string;
|
|
23
|
-
/** @param {Ratio} bidScaling */
|
|
24
|
-
offersAbove(bidScaling: Ratio): [string, BidderRecord][];
|
|
25
|
-
hasOrders(): boolean;
|
|
26
|
-
delete(key: any): void;
|
|
27
|
-
updateReceived(key: any, sold: any): void;
|
|
28
|
-
exitAllSeats(): void;
|
|
29
|
-
}>;
|
|
30
|
-
export function preparePriceBook(baggage: Baggage): (priceRatioPattern: any, collateralBrand: Brand<AssetKind>) => {
|
|
31
|
-
/**
|
|
32
|
-
* @param {ZCFSeat} seat
|
|
33
|
-
* @param {Ratio} price
|
|
34
|
-
* @param {Amount<'nat'>} wanted
|
|
35
|
-
* @param {boolean} exitAfterBuy
|
|
36
|
-
*/
|
|
37
|
-
add(seat: ZCFSeat, price: Ratio, wanted: Amount<'nat'>, exitAfterBuy: boolean): string;
|
|
38
|
-
offersAbove(price: any): [string, BidderRecord][];
|
|
39
|
-
hasOrders(): boolean;
|
|
40
|
-
delete(key: any): void;
|
|
41
|
-
updateReceived(key: any, sold: any): void;
|
|
42
|
-
exitAllSeats(): void;
|
|
43
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
44
|
-
/**
|
|
45
|
-
* @param {ZCFSeat} seat
|
|
46
|
-
* @param {Ratio} price
|
|
47
|
-
* @param {Amount<'nat'>} wanted
|
|
48
|
-
* @param {boolean} exitAfterBuy
|
|
49
|
-
*/
|
|
50
|
-
add(seat: ZCFSeat, price: Ratio, wanted: Amount<'nat'>, exitAfterBuy: boolean): string;
|
|
51
|
-
offersAbove(price: any): [string, BidderRecord][];
|
|
52
|
-
hasOrders(): boolean;
|
|
53
|
-
delete(key: any): void;
|
|
54
|
-
updateReceived(key: any, sold: any): void;
|
|
55
|
-
exitAllSeats(): void;
|
|
56
|
-
}>;
|
|
57
|
-
export type Baggage = import('@agoric/vat-data').Baggage;
|
|
58
|
-
export type BidderRecord = {
|
|
59
|
-
seat: ZCFSeat;
|
|
60
|
-
wanted: Amount<'nat'>;
|
|
61
|
-
seqNum: NatValue;
|
|
62
|
-
received: Amount<'nat'>;
|
|
63
|
-
} & {
|
|
64
|
-
exitAfterBuy: boolean;
|
|
65
|
-
} & ({
|
|
66
|
-
bidScaling: Pattern;
|
|
67
|
-
price: undefined;
|
|
68
|
-
} | {
|
|
69
|
-
bidScaling: undefined;
|
|
70
|
-
price: Ratio;
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=offerBook.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"offerBook.d.ts","sourceRoot":"","sources":["offerBook.js"],"names":[],"mappings":"AAkDO,8CAFI,OAAO;IAkBZ;;;;;OAKG;cAJQ,OAAO,cACP,KAAK,UACL,OAAO,KAAK,CAAC,gBACb,OAAO;IAsBlB,gCAAgC;4BAApB,KAAK;;;;;;IA1BjB;;;;;OAKG;cAJQ,OAAO,cACP,KAAK,UACL,OAAO,KAAK,CAAC,gBACb,OAAO;IAsBlB,gCAAgC;4BAApB,KAAK;;;;;GAqCpB;AAcI,0CAFI,OAAO;IAkBZ;;;;;OAKG;cAJQ,OAAO,SACP,KAAK,UACL,OAAO,KAAK,CAAC,gBACb,OAAO;;;;;;;IAJlB;;;;;OAKG;cAJQ,OAAO,SACP,KAAK,UACL,OAAO,KAAK,CAAC,gBACb,OAAO;;;;;;GA0DrB;sBA/MW,OAAO,kBAAkB,EAAE,OAAO;2BAYnC;IACZ,IAAQ,EAAE,OAAO,CAAC;IAClB,MAAU,EAAE,OAAO,KAAK,CAAC,CAAC;IAC1B,MAAU,EAAE,QAAQ,CAAC;IACrB,QAAY,EAAE,OAAO,KAAK,CAAC,CAAC;CACzB,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,GAAG,CAC1B;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACzC;IAAE,UAAU,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAC1C"}
|
package/src/auction/params.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/** @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').AsyncSpecTuple} AsyncSpecTuple */
|
|
2
|
-
/** @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager.js').SyncSpecTuple} SyncSpecTuple */
|
|
3
|
-
export const InvitationShape: any;
|
|
4
|
-
/**
|
|
5
|
-
* In seconds, how often to start an auction. The auction will start at
|
|
6
|
-
* AUCTION_START_DELAY seconds after a multiple of START_FREQUENCY, with the
|
|
7
|
-
* price at STARTING_RATE_BP. Every CLOCK_STEP, the price will be reduced by
|
|
8
|
-
* DISCOUNT_STEP_BP, as long as the rate is at or above LOWEST_RATE_BP, or until
|
|
9
|
-
* START_FREQUENCY has elapsed.
|
|
10
|
-
*/
|
|
11
|
-
export const START_FREQUENCY: "StartFrequency";
|
|
12
|
-
/** in seconds, how often to reduce the price */
|
|
13
|
-
export const CLOCK_STEP: "ClockStep";
|
|
14
|
-
/** discount or markup for starting price in basis points. 9999 = 1bp discount */
|
|
15
|
-
export const STARTING_RATE_BP: "StartingRate";
|
|
16
|
-
/** A limit below which the price will not be discounted. */
|
|
17
|
-
export const LOWEST_RATE_BP: "LowestRate";
|
|
18
|
-
/** amount to reduce prices each time step in bp, as % of the start price */
|
|
19
|
-
export const DISCOUNT_STEP_BP: "DiscountStep";
|
|
20
|
-
/**
|
|
21
|
-
* VaultManagers liquidate vaults at a frequency configured by START_FREQUENCY.
|
|
22
|
-
* Auctions start this long after the hour to give vaults time to finish.
|
|
23
|
-
*/
|
|
24
|
-
export const AUCTION_START_DELAY: "AuctionStartDelay";
|
|
25
|
-
export const PRICE_LOCK_PERIOD: "PriceLockPeriod";
|
|
26
|
-
export const auctioneerParamPattern: any;
|
|
27
|
-
export namespace auctioneerParamTypes {
|
|
28
|
-
let Electorate: "invitation";
|
|
29
|
-
let StartFrequency: "relativeTime";
|
|
30
|
-
let ClockStep: "relativeTime";
|
|
31
|
-
let StartingRate: "nat";
|
|
32
|
-
let LowestRate: "nat";
|
|
33
|
-
let DiscountStep: "nat";
|
|
34
|
-
let AuctionStartDelay: "relativeTime";
|
|
35
|
-
let PriceLockPeriod: "relativeTime";
|
|
36
|
-
}
|
|
37
|
-
export function makeAuctioneerParams({ ElectorateInvitationAmount, StartFrequency, ClockStep, LowestRate, StartingRate, DiscountStep, AuctionStartDelay, PriceLockPeriod, TimerBrand, }: AuctionParams): {
|
|
38
|
-
Electorate: {
|
|
39
|
-
type: "invitation";
|
|
40
|
-
value: Amount<"set">;
|
|
41
|
-
};
|
|
42
|
-
StartFrequency: {
|
|
43
|
-
type: "relativeTime";
|
|
44
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
45
|
-
};
|
|
46
|
-
ClockStep: {
|
|
47
|
-
type: "relativeTime";
|
|
48
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
49
|
-
};
|
|
50
|
-
AuctionStartDelay: {
|
|
51
|
-
type: "relativeTime";
|
|
52
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
53
|
-
};
|
|
54
|
-
PriceLockPeriod: {
|
|
55
|
-
type: "relativeTime";
|
|
56
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
57
|
-
};
|
|
58
|
-
StartingRate: {
|
|
59
|
-
type: "nat";
|
|
60
|
-
value: bigint;
|
|
61
|
-
};
|
|
62
|
-
LowestRate: {
|
|
63
|
-
type: "nat";
|
|
64
|
-
value: bigint;
|
|
65
|
-
};
|
|
66
|
-
DiscountStep: {
|
|
67
|
-
type: "nat";
|
|
68
|
-
value: bigint;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export function makeAuctioneerParamManager(publisherKit: import('@agoric/notifier').StoredPublisherKit<GovernanceSubscriptionState>, zcf: ZCF, initial: AuctionParams): import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
72
|
-
Electorate: "invitation";
|
|
73
|
-
StartFrequency: "relativeTime";
|
|
74
|
-
ClockStep: "relativeTime";
|
|
75
|
-
StartingRate: "nat";
|
|
76
|
-
LowestRate: "nat";
|
|
77
|
-
DiscountStep: "nat";
|
|
78
|
-
AuctionStartDelay: "relativeTime";
|
|
79
|
-
PriceLockPeriod: "relativeTime";
|
|
80
|
-
}>;
|
|
81
|
-
export function makeGovernedTerms({ storageNode: _storageNode, marshaller: _marshaller }: {
|
|
82
|
-
storageNode: ERef<StorageNode>;
|
|
83
|
-
marshaller: ERef<Marshaller>;
|
|
84
|
-
}, timer: ERef<Timer>, priceAuthority: ERef<PriceAuthority>, reservePublicFacet: ERef<AssetReservePublicFacet>, params: AuctionParams): {
|
|
85
|
-
priceAuthority: ERef<PriceAuthority>;
|
|
86
|
-
reservePublicFacet: ERef<GovernedPublicFacet<{
|
|
87
|
-
makeAddCollateralInvitation(): Promise<Invitation<R, A>>;
|
|
88
|
-
getPublicTopics(): {
|
|
89
|
-
metrics: import("@agoric/zoe/src/contractSupport").PublicTopic<import("../reserve/assetReserveKit").MetricsNotification>;
|
|
90
|
-
};
|
|
91
|
-
}>>;
|
|
92
|
-
timerService: ERef<Timer>;
|
|
93
|
-
governedParams: {
|
|
94
|
-
Electorate: {
|
|
95
|
-
type: "invitation";
|
|
96
|
-
value: Amount<"set">;
|
|
97
|
-
};
|
|
98
|
-
StartFrequency: {
|
|
99
|
-
type: "relativeTime";
|
|
100
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
101
|
-
};
|
|
102
|
-
ClockStep: {
|
|
103
|
-
type: "relativeTime";
|
|
104
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
105
|
-
};
|
|
106
|
-
AuctionStartDelay: {
|
|
107
|
-
type: "relativeTime";
|
|
108
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
109
|
-
};
|
|
110
|
-
PriceLockPeriod: {
|
|
111
|
-
type: "relativeTime";
|
|
112
|
-
value: import("@agoric/time/src/types").RelativeTimeRecord;
|
|
113
|
-
};
|
|
114
|
-
StartingRate: {
|
|
115
|
-
type: "nat";
|
|
116
|
-
value: bigint;
|
|
117
|
-
};
|
|
118
|
-
LowestRate: {
|
|
119
|
-
type: "nat";
|
|
120
|
-
value: bigint;
|
|
121
|
-
};
|
|
122
|
-
DiscountStep: {
|
|
123
|
-
type: "nat";
|
|
124
|
-
value: bigint;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
export type AsyncSpecTuple = import('@agoric/governance/src/contractGovernance/typedParamManager.js').AsyncSpecTuple;
|
|
129
|
-
export type SyncSpecTuple = import('@agoric/governance/src/contractGovernance/typedParamManager.js').SyncSpecTuple;
|
|
130
|
-
export type AuctionParams = {
|
|
131
|
-
ElectorateInvitationAmount: Amount<'set'>;
|
|
132
|
-
StartFrequency: RelativeTime;
|
|
133
|
-
ClockStep: RelativeTime;
|
|
134
|
-
StartingRate: bigint;
|
|
135
|
-
LowestRate: bigint;
|
|
136
|
-
DiscountStep: bigint;
|
|
137
|
-
AuctionStartDelay: RelativeTime;
|
|
138
|
-
PriceLockPeriod: RelativeTime;
|
|
139
|
-
TimerBrand: import('@agoric/time/src/types').TimerBrand;
|
|
140
|
-
};
|
|
141
|
-
export type AuctionParamManager = ReturnType<typeof makeAuctioneerParamManager>;
|
|
142
|
-
//# sourceMappingURL=params.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["params.js"],"names":[],"mappings":"AAQA,wHAAwH;AACxH,sHAAsH;AAGtH,kCAAyD;AAEzD;;;;;;GAMG;AACH,+CAAgD;AAChD,gDAAgD;AAChD,qCAAsC;AACtC,iFAAiF;AACjF,8CAA+C;AAC/C,4DAA4D;AAC5D,0CAA2C;AAC3C,4EAA4E;AAC5E,8CAA+C;AAC/C;;;GAGG;AACH,sDAAuD;AAIvD,kDAAmD;AAEnD,yCASG;;;;;;;;;;;AA2BI,yLADK,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCxB;AAQM,yDAJI,OAAO,kBAAkB,EAAE,kBAAkB,CAAC,2BAA2B,CAAC,OAC1E,GAAG,WACH,aAAa;;;;;;;;;GA0BvB;AAUM,0FANI;IAAE,WAAW,EAAE,KAAK,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,KAAK,UAAU,CAAC,CAAA;CAAE,SAChE,KAAK,KAAK,CAAC,kBACX,KAAK,cAAc,CAAC,sBACpB,KAAK,uBAAuB,CAAC,UAC7B,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBvB;6BAhKa,OAAO,gEAAgE,EAAE,cAAc;4BACvF,OAAO,gEAAgE,EAAE,aAAa;;gCAuDtF,OAAO,KAAK,CAAC;oBACb,YAAY;eACZ,YAAY;kBACZ,MAAM;gBACN,MAAM;kBACN,MAAM;uBACN,YAAY;qBACZ,YAAY;gBACZ,OAAO,wBAAwB,EAAE,UAAU;;kCAmG3C,WAAW,iCAAiC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export function computeRoundTiming(params: Awaited<import('./params.js').AuctionParamManager>, baseTime: Timestamp): import('./scheduler.js').Schedule;
|
|
2
|
-
export function nextDescendingStepTime(liveSchedule: import('./scheduler.js').Schedule | null, nextSchedule: import('./scheduler.js').Schedule | null, now: Timestamp): Timestamp | null;
|
|
3
|
-
export function timeVsSchedule(time: Timestamp, schedule: import('./scheduler.js').Schedule): 'before' | 'during' | 'endExactly' | 'after';
|
|
4
|
-
//# sourceMappingURL=scheduleMath.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleMath.d.ts","sourceRoot":"","sources":["scheduleMath.js"],"names":[],"mappings":"AAwCO,2CAJI,QAAQ,OAAO,aAAa,EAAE,mBAAmB,CAAC,YAClD,SAAS,GACP,OAAO,gBAAgB,EAAE,QAAQ,CAqE7C;AAcM,qDALI,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,gBACxC,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,OACxC,SAAS,GACP,SAAS,GAAG,IAAI,CAuB5B;AAQM,qCAJI,SAAS,YACT,OAAO,gBAAgB,EAAE,QAAQ,GAC/B,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAiBxD"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export function makeScheduler(auctionDriver: AuctionDriver, timer: import('@agoric/time/src/types').TimerService, params: Awaited<import('./params.js').AuctionParamManager>, timerBrand: import('@agoric/time/src/types').TimerBrand, scheduleRecorder: import('@agoric/zoe/src/contractSupport/recorder.js').Recorder<ScheduleNotification>, paramUpdateSubscription: StoredSubscription<GovernanceSubscriptionState>): Promise<{
|
|
2
|
-
getSchedule: () => {
|
|
3
|
-
liveAuctionSchedule: Schedule | null;
|
|
4
|
-
nextAuctionSchedule: Schedule | null;
|
|
5
|
-
};
|
|
6
|
-
getAuctionState: () => "active" | "waiting";
|
|
7
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
8
|
-
getSchedule: () => {
|
|
9
|
-
liveAuctionSchedule: Schedule | null;
|
|
10
|
-
nextAuctionSchedule: Schedule | null;
|
|
11
|
-
};
|
|
12
|
-
getAuctionState: () => "active" | "waiting";
|
|
13
|
-
}>>;
|
|
14
|
-
export type AuctionDriver = {
|
|
15
|
-
reducePriceAndTrade: () => void;
|
|
16
|
-
finalize: () => void;
|
|
17
|
-
startRound: () => void;
|
|
18
|
-
capturePrices: () => void;
|
|
19
|
-
};
|
|
20
|
-
export type ScheduleNotification = {
|
|
21
|
-
/**
|
|
22
|
-
* start time of current auction if
|
|
23
|
-
* auction is active
|
|
24
|
-
*/
|
|
25
|
-
activeStartTime: Timestamp | null;
|
|
26
|
-
/**
|
|
27
|
-
* start time of next auction
|
|
28
|
-
*/
|
|
29
|
-
nextStartTime: Timestamp | null;
|
|
30
|
-
/**
|
|
31
|
-
* when the next descending
|
|
32
|
-
* step will take place
|
|
33
|
-
*/
|
|
34
|
-
nextDescendingStepTime: Timestamp | null;
|
|
35
|
-
};
|
|
36
|
-
export type Schedule = {
|
|
37
|
-
startTime: import('@agoric/time/src/types').TimestampRecord;
|
|
38
|
-
endTime: import('@agoric/time/src/types').TimestampRecord;
|
|
39
|
-
steps: NatValue;
|
|
40
|
-
endRate: NatValue;
|
|
41
|
-
startDelay: RelativeTime;
|
|
42
|
-
clockStep: RelativeTime;
|
|
43
|
-
lockTime?: import("@agoric/time/src/types").Timestamp | undefined;
|
|
44
|
-
};
|
|
45
|
-
export type FullSchedule = {
|
|
46
|
-
nextAuctionSchedule: Schedule | null;
|
|
47
|
-
liveAuctionSchedule: Schedule | null;
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["scheduler.js"],"names":[],"mappings":"AA+EO,6CAPI,aAAa,SACb,OAAO,wBAAwB,EAAE,YAAY,UAC7C,QAAQ,OAAO,aAAa,EAAE,mBAAmB,CAAC,cAClD,OAAO,wBAAwB,EAAE,UAAU,oBAC3C,OAAO,6CAA6C,EAAE,QAAQ,CAAC,oBAAoB,CAAC,2BACpF,mBAAmB,2BAA2B,CAAC;;;;;;;;;;;;IAmRzD;;yBApTa,MAAM,IAAI;cACV,MAAM,IAAI;gBACV,MAAM,IAAI;mBACV,MAAM,IAAI;;;;;;;qBAKV,SAAS,GAAG,IAAI;;;;mBAEhB,SAAS,GAAG,IAAI;;;;;4BAChB,SAAS,GAAG,IAAI;;;eA6ShB,OAAO,wBAAwB,EAAE,eAAe;aAChD,OAAO,wBAAwB,EAAE,eAAe;WAChD,QAAQ;aACR,QAAQ;gBACR,YAAY;eACZ,YAAY;;;;yBAMZ,QAAQ,GAAG,IAAI;yBACf,QAAQ,GAAG,IAAI"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export function toPartialOfferKey(offerPrice: Ratio): string;
|
|
2
|
-
export function toPriceOfferKey(offerPrice: Ratio, sequenceNumber: bigint): string;
|
|
3
|
-
export function fromPriceOfferKey(key: string, numBrand: Brand<'nat'>, denomBrand: Brand<'nat'>, useDecimals: number): [normalizedPrice: Ratio, sequenceNumber: bigint];
|
|
4
|
-
/** @type {(rate: Ratio) => string} */
|
|
5
|
-
export const toBidScalingComparator: (rate: Ratio) => string;
|
|
6
|
-
export function toScaledRateOfferKey(rate: Ratio, sequenceNumber: bigint): string;
|
|
7
|
-
export function fromScaledRateOfferKey(key: string, brand: Brand, useDecimals: number): [normalizedPrice: Ratio, sequenceNumber: bigint];
|
|
8
|
-
//# sourceMappingURL=sortedOffers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sortedOffers.d.ts","sourceRoot":"","sources":["sortedOffers.js"],"names":[],"mappings":"AA8BO,8CAFI,KAAK,UAMf;AAUM,4CALI,KAAK,kBACL,MAAM,GACJ,MAAM,CAWlB;AAqCM,uCANI,MAAM,YACN,MAAM,KAAK,CAAC,cACZ,MAAM,KAAK,CAAC,eACZ,MAAM,GACJ,CAAC,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAQ5D;AAED,sCAAsC;AACtC,4CADkB,KAAK,KAAK,MAAM,CAKhC;AAUK,2CALI,KAAK,kBACL,MAAM,GACJ,MAAM,CAWlB;AAUM,4CALI,MAAM,SACN,KAAK,eACL,MAAM,GACJ,CAAC,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAQ5D"}
|
package/src/auction/util.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constants for Auction State.
|
|
3
|
-
*
|
|
4
|
-
* @type {{ ACTIVE: 'active'; WAITING: 'waiting' }}
|
|
5
|
-
*/
|
|
6
|
-
export const AuctionState: {
|
|
7
|
-
ACTIVE: 'active';
|
|
8
|
-
WAITING: 'waiting';
|
|
9
|
-
};
|
|
10
|
-
export function makeBrandedRatioPattern(numeratorAmountShape: {
|
|
11
|
-
brand: Brand;
|
|
12
|
-
value: Pattern;
|
|
13
|
-
}, denominatorAmountShape: {
|
|
14
|
-
brand: Brand;
|
|
15
|
-
value: Pattern;
|
|
16
|
-
}): {
|
|
17
|
-
numerator: {
|
|
18
|
-
brand: Brand;
|
|
19
|
-
value: Pattern;
|
|
20
|
-
};
|
|
21
|
-
denominator: {
|
|
22
|
-
brand: Brand;
|
|
23
|
-
value: Pattern;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export function isScaledBidPriceHigher(bidScaling: Ratio, currentPrice: Ratio, oraclePrice: Ratio): boolean;
|
|
27
|
-
/** @type {(quote: PriceQuote) => Ratio} */
|
|
28
|
-
export const priceFrom: (quote: PriceQuote) => Ratio;
|
|
29
|
-
export function makeCancelTokenMaker(name: any): () => import("@endo/eventual-send").RemotableBrand<{}, {}>;
|
|
30
|
-
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH,2BAFU;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAKhD;AAMK,8DAHI;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,0BAChC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE;;eADvB,KAAK;eAAS,OAAO;;;eACrB,KAAK;eAAS,OAAO;;EAUxC;AASM,mDANI,KAAK,gBACL,KAAK,eACL,KAAK,GACH,OAAO,CAI6C;AAEjE,2CAA2C;AAC3C,gCADmB,UAAU,KAAK,KAAK,CAKnC;AAEG,4GAIN"}
|
package/src/clientSupport.d.ts
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
export function lookupOfferIdForVault(vaultId: string, currentP: Promise<import('@agoric/smart-wallet/src/smartWallet').CurrentWalletRecord>): Promise<string>;
|
|
2
|
-
export function makeParseAmount(agoricNames: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand' | 'vbankAsset'>, makeError?: (msg: string) => Error): (a: string) => Amount<'nat'>;
|
|
3
|
-
export namespace Offers {
|
|
4
|
-
namespace auction {
|
|
5
|
-
export { makeBidOffer as Bid };
|
|
6
|
-
}
|
|
7
|
-
namespace fluxAggregator {
|
|
8
|
-
export { makePushPriceOffer as PushPrice };
|
|
9
|
-
}
|
|
10
|
-
namespace psm {
|
|
11
|
-
export { makePsmSwapOffer as swap };
|
|
12
|
-
}
|
|
13
|
-
namespace vaults {
|
|
14
|
-
export { makeOpenOffer as OpenVault };
|
|
15
|
-
export { makeAdjustOffer as AdjustBalances };
|
|
16
|
-
export { makeCloseOffer as CloseVault };
|
|
17
|
-
}
|
|
18
|
-
namespace reserve {
|
|
19
|
-
export { makeAddCollateralOffer as AddCollateral };
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @param {Pick<
|
|
24
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
25
|
-
* 'brand' | 'vbankAsset'
|
|
26
|
-
* >} agoricNames
|
|
27
|
-
* @param {{
|
|
28
|
-
* offerId: string;
|
|
29
|
-
* give: string;
|
|
30
|
-
* maxBuy: string;
|
|
31
|
-
* wantMinimum?: string;
|
|
32
|
-
* } & (
|
|
33
|
-
* | {
|
|
34
|
-
* price: number;
|
|
35
|
-
* }
|
|
36
|
-
* | {
|
|
37
|
-
* discount: number; // -1 to 1. e.g. 0.10 for 10% discount, -0.05 for 5% markup
|
|
38
|
-
* }
|
|
39
|
-
* )} opts
|
|
40
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
41
|
-
*/
|
|
42
|
-
declare function makeBidOffer(agoricNames: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand' | 'vbankAsset'>, opts: {
|
|
43
|
-
offerId: string;
|
|
44
|
-
give: string;
|
|
45
|
-
maxBuy: string;
|
|
46
|
-
wantMinimum?: string | undefined;
|
|
47
|
-
} & ({
|
|
48
|
-
price: number;
|
|
49
|
-
} | {
|
|
50
|
-
discount: number;
|
|
51
|
-
})): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
52
|
-
/**
|
|
53
|
-
* @param {unknown} _agoricNames
|
|
54
|
-
* @param {{
|
|
55
|
-
* offerId: string;
|
|
56
|
-
* roundId?: bigint;
|
|
57
|
-
* unitPrice: bigint;
|
|
58
|
-
* }} opts
|
|
59
|
-
* @param {string} previousOffer
|
|
60
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
61
|
-
*/
|
|
62
|
-
declare function makePushPriceOffer(_agoricNames: unknown, opts: {
|
|
63
|
-
offerId: string;
|
|
64
|
-
roundId?: bigint;
|
|
65
|
-
unitPrice: bigint;
|
|
66
|
-
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
67
|
-
/**
|
|
68
|
-
* @param {Pick<
|
|
69
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
70
|
-
* 'brand'
|
|
71
|
-
* >} agoricNames
|
|
72
|
-
* @param {Instance} instance
|
|
73
|
-
* @param {{ offerId: string; feePct?: number; pair: [string, string] } & (
|
|
74
|
-
* | { wantMinted: number }
|
|
75
|
-
* | { giveMinted: number }
|
|
76
|
-
* )} opts
|
|
77
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
78
|
-
*/
|
|
79
|
-
declare function makePsmSwapOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, instance: Instance, opts: {
|
|
80
|
-
offerId: string;
|
|
81
|
-
feePct?: number;
|
|
82
|
-
pair: [string, string];
|
|
83
|
-
} & ({
|
|
84
|
-
wantMinted: number;
|
|
85
|
-
} | {
|
|
86
|
-
giveMinted: number;
|
|
87
|
-
})): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
88
|
-
/**
|
|
89
|
-
* @param {Pick<
|
|
90
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
91
|
-
* 'brand'
|
|
92
|
-
* >} agoricNames
|
|
93
|
-
* @param {{
|
|
94
|
-
* offerId: string;
|
|
95
|
-
* wantMinted: number;
|
|
96
|
-
* giveCollateral: number;
|
|
97
|
-
* collateralBrandKey: string;
|
|
98
|
-
* }} opts
|
|
99
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
100
|
-
*/
|
|
101
|
-
declare function makeOpenOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
102
|
-
offerId: string;
|
|
103
|
-
wantMinted: number;
|
|
104
|
-
giveCollateral: number;
|
|
105
|
-
collateralBrandKey: string;
|
|
106
|
-
}): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
107
|
-
/**
|
|
108
|
-
* @param {Pick<
|
|
109
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
110
|
-
* 'brand'
|
|
111
|
-
* >} agoricNames
|
|
112
|
-
* @param {{
|
|
113
|
-
* offerId: string;
|
|
114
|
-
* collateralBrandKey?: string;
|
|
115
|
-
* giveCollateral?: number;
|
|
116
|
-
* wantCollateral?: number;
|
|
117
|
-
* giveMinted?: number;
|
|
118
|
-
* wantMinted?: number;
|
|
119
|
-
* }} opts
|
|
120
|
-
* @param {string} previousOffer
|
|
121
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
122
|
-
*/
|
|
123
|
-
declare function makeAdjustOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
124
|
-
offerId: string;
|
|
125
|
-
collateralBrandKey?: string;
|
|
126
|
-
giveCollateral?: number;
|
|
127
|
-
wantCollateral?: number;
|
|
128
|
-
giveMinted?: number;
|
|
129
|
-
wantMinted?: number;
|
|
130
|
-
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
131
|
-
/**
|
|
132
|
-
* @param {Pick<
|
|
133
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
134
|
-
* 'brand'
|
|
135
|
-
* >} agoricNames
|
|
136
|
-
* @param {{
|
|
137
|
-
* offerId: string;
|
|
138
|
-
* collateralBrandKey?: string;
|
|
139
|
-
* giveMinted: number;
|
|
140
|
-
* }} opts
|
|
141
|
-
* @param {string} previousOffer
|
|
142
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
143
|
-
*/
|
|
144
|
-
declare function makeCloseOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
145
|
-
offerId: string;
|
|
146
|
-
collateralBrandKey?: string;
|
|
147
|
-
giveMinted: number;
|
|
148
|
-
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
149
|
-
/**
|
|
150
|
-
* @param {Pick<
|
|
151
|
-
* import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes,
|
|
152
|
-
* 'brand'
|
|
153
|
-
* >} agoricNames
|
|
154
|
-
* @param {{
|
|
155
|
-
* offerId: string;
|
|
156
|
-
* give: number;
|
|
157
|
-
* collateralBrandKey: string;
|
|
158
|
-
* }} opts
|
|
159
|
-
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
160
|
-
*/
|
|
161
|
-
declare function makeAddCollateralOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
162
|
-
offerId: string;
|
|
163
|
-
give: number;
|
|
164
|
-
collateralBrandKey: string;
|
|
165
|
-
}): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
166
|
-
export {};
|
|
167
|
-
//# sourceMappingURL=clientSupport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clientSupport.d.ts","sourceRoot":"","sources":["clientSupport.js"],"names":[],"mappings":"AAsKO,+CANI,MAAM,YACN,QACV,OAAW,sCAAsC,EAAE,mBAAmB,CACnE,GACS,QAAQ,MAAM,CAAC,CAW3B;AAmFM,6CAPI,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,GAAG,YAAY,CACvB,oBACa,MAAM,KAAK,KAAK,OAChB,MAAM,KAAK,OAAO,KAAK,CAAC,CAiCtC;;;;;;;;;;;;;;;;;;;;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAnBW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,GAAG,YAAY,CACvB;aAEU,MAAM;UACT,MAAM;YACJ,MAAM;;;WAIH,MAAM;;cAGH,MAAM;KAGZ,OAAO,oCAAoC,EAAE,SAAS,CAuDlE;AAqCD;;;;;;;;;GASG;AACH,kDATW,OAAO,QACP;IACV,OAAW,EAAE,MAAM,CAAC;IACpB,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAa,EAAE,MAAM,CAAC;CACnB,iBACO,MAAM,GACJ,OAAO,oCAAoC,EAAE,SAAS,CAelE;AAtND;;;;;;;;;;;GAWG;AACH,6CAXW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,CACR,YACO,QAAQ,QACR;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CACnE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACtB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CACzB,GACS,OAAO,oCAAoC,EAAE,SAAS,CA4BlE;AAzLD;;;;;;;;;;;;GAYG;AACH,0CAZW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,CACR,QACO;IACV,OAAW,EAAE,MAAM,CAAC;IACpB,UAAc,EAAE,MAAM,CAAC;IACvB,cAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAsB,EAAE,MAAM,CAAC;CAC5B,GACS,OAAO,oCAAoC,EAAE,SAAS,CAuBlE;AAED;;;;;;;;;;;;;;;GAeG;AACH,4CAfW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,CACR,QACO;IACV,OAAW,EAAE,MAAM,CAAC;IACpB,kBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAc,CAAC,EAAE,MAAM,CAAC;CACrB,iBACO,MAAM,GACJ,OAAO,oCAAoC,EAAE,SAAS,CAiBlE;AAED;;;;;;;;;;;;GAYG;AACH,2CAZW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,CACR,QACO;IACV,OAAW,EAAE,MAAM,CAAC;IACpB,kBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,UAAc,EAAE,MAAM,CAAC;CACpB,iBACO,MAAM,GACJ,OAAO,oCAAoC,EAAE,SAAS,CAclE;AAiND;;;;;;;;;;;GAWG;AACH,mDAXW,KACV,OAAW,mCAAmC,EAAE,kBAAkB,EAClE,OAAW,CACR;aAEU,MAAM;UACT,MAAM;wBACQ,MAAM;IAElB,OAAO,oCAAoC,EAAE,SAAS,CAuBlE"}
|
package/src/collectFees.d.ts
DELETED
package/src/collectFees.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectFees.d.ts","sourceRoot":"","sources":["collectFees.js"],"names":[],"mappings":"AAaO,+CANI,GAAG,WACH,OAAO,YACP,KAAK,WACL,MAAM,GACJ,QAAQ,WAAW,MAAM,CAAC,CAAC,CAYvC"}
|
package/src/contractSupport.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export namespace amountPattern {
|
|
2
|
-
let brand: any;
|
|
3
|
-
let value: any;
|
|
4
|
-
}
|
|
5
|
-
export namespace ratioPattern {
|
|
6
|
-
export { amountPattern as numerator };
|
|
7
|
-
export { amountPattern as denominator };
|
|
8
|
-
}
|
|
9
|
-
export function addSubtract<K extends AssetKind>(base: Amount<K>, gain: Amount<K>, loss: Amount<K>): Amount<K>;
|
|
10
|
-
export function subtractToEmpty<T extends Amount<AssetKind>>(left: T, right: T): T;
|
|
11
|
-
export function assertOnlyKeys(proposal: ProposalRecord, keys: string[]): void;
|
|
12
|
-
export function allEmpty(amounts: Amount[]): boolean;
|
|
13
|
-
export function checkDebtLimit(debtLimit: Amount<'nat'>, totalDebt: Amount<'nat'>, toMint: Amount<'nat'>): void;
|
|
14
|
-
export function makeNatAmountShape(brand: Brand, min?: bigint | undefined): {
|
|
15
|
-
brand: Brand<AssetKind>;
|
|
16
|
-
value: any;
|
|
17
|
-
};
|
|
18
|
-
export function quoteAsRatio(quoteAmount: Pick<PriceDescription, 'amountIn' | 'amountOut'>): Ratio;
|
|
19
|
-
/**
|
|
20
|
-
* <T>
|
|
21
|
-
*/
|
|
22
|
-
export type MetricsPublisherKit<T> = {
|
|
23
|
-
metricsPublication: IterationObserver<T>;
|
|
24
|
-
metricsSubscription: StoredSubscription<T>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* <T>
|
|
28
|
-
*/
|
|
29
|
-
export type MetricsPublishKit<T> = {
|
|
30
|
-
metricsPublisher: Publisher<T>;
|
|
31
|
-
metricsSubscriber: StoredSubscriber<T>;
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=contractSupport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contractSupport.d.ts","sourceRoot":"","sources":["contractSupport.js"],"names":[],"mappings":";;;;;;;;AA2BO,+GACgD;AAQhD,mFAGkD;AAQlD,yCAHI,cAAc,QACd,MAAM,EAAE,QAQlB;AAMM,kCAHI,MAAM,EAAE,GACN,OAAO,CAInB;AAQM,0CALI,OAAO,KAAK,CAAC,aACb,OAAO,KAAK,CAAC,UACb,OAAO,KAAK,CAAC,QASvB;AAoBM,0CAHI,KAAK;;;EAIsC;AAG/C,0CADK,KAAK,gBAAgB,EAAE,UAAU,GAAG,WAAW,CAAC,SAEO;;;;;wBApBrD,kBAAkB,CAAC,CAAC;yBACpB,mBAAmB,CAAC,CAAC;;;;;;sBAMrB,UAAU,CAAC,CAAC;uBACZ,iBAAiB,CAAC,CAAC"}
|