@agoric/inter-protocol 0.16.2-dev-6e5b422.0 → 0.16.2-dev-bd1190d.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-auctioneer-js-meta.json +116 -116
- package/bundles/bundle-econCommitteeCharter-js-meta.json +71 -71
- package/bundles/bundle-feeDistributor-js-meta.json +57 -57
- package/bundles/bundle-fluxAggregatorKit-js-meta.json +111 -111
- package/bundles/bundle-psm-js-meta.json +109 -109
- package/bundles/bundle-reserve-js-meta.json +108 -108
- package/bundles/bundle-scaledPriceAuthority-js-meta.json +84 -84
- package/bundles/bundle-vaultFactory-js-meta.json +133 -133
- package/package.json +19 -17
- package/src/auction/auctionBook.d.ts +80 -0
- package/src/auction/auctionBook.d.ts.map +1 -0
- package/src/auction/auctioneer.d.ts +75 -0
- package/src/auction/auctioneer.d.ts.map +1 -0
- package/src/auction/offerBook.d.ts +72 -0
- package/src/auction/offerBook.d.ts.map +1 -0
- package/src/auction/params.d.ts +142 -0
- package/src/auction/params.d.ts.map +1 -0
- package/src/auction/scheduleMath.d.ts +4 -0
- package/src/auction/scheduleMath.d.ts.map +1 -0
- package/src/auction/scheduler.d.ts +49 -0
- package/src/auction/scheduler.d.ts.map +1 -0
- package/src/auction/sortedOffers.d.ts +8 -0
- package/src/auction/sortedOffers.d.ts.map +1 -0
- package/src/auction/util.d.ts +30 -0
- package/src/auction/util.d.ts.map +1 -0
- package/src/clientSupport.d.ts +129 -0
- package/src/clientSupport.d.ts.map +1 -0
- package/src/collectFees.d.ts +2 -0
- package/src/collectFees.d.ts.map +1 -0
- package/src/contractSupport.d.ts +33 -0
- package/src/contractSupport.d.ts.map +1 -0
- package/src/econCommitteeCharter.d.ts +45 -0
- package/src/econCommitteeCharter.d.ts.map +1 -0
- package/src/feeDistributor.d.ts +234 -0
- package/src/feeDistributor.d.ts.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/interest-math.d.ts +3 -0
- package/src/interest-math.d.ts.map +1 -0
- package/src/interest.d.ts +28 -0
- package/src/interest.d.ts.map +1 -0
- package/src/price/fluxAggregatorContract.d.ts +110 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -0
- package/src/price/fluxAggregatorKit.d.ts +150 -0
- package/src/price/fluxAggregatorKit.d.ts.map +1 -0
- package/src/price/priceOracleKit.d.ts +58 -0
- package/src/price/priceOracleKit.d.ts.map +1 -0
- package/src/price/roundsManager.d.ts +348 -0
- package/src/price/roundsManager.d.ts.map +1 -0
- package/src/proposals/addAssetToVault.d.ts +155 -0
- package/src/proposals/addAssetToVault.d.ts.map +1 -0
- package/src/proposals/committee-proposal.d.ts +121 -0
- package/src/proposals/committee-proposal.d.ts.map +1 -0
- package/src/proposals/core-proposal.d.ts +149 -0
- package/src/proposals/core-proposal.d.ts.map +1 -0
- package/src/proposals/econ-behaviors.d.ts +201 -0
- package/src/proposals/econ-behaviors.d.ts.map +1 -0
- package/src/proposals/price-feed-proposal.d.ts +83 -0
- package/src/proposals/price-feed-proposal.d.ts.map +1 -0
- package/src/proposals/startEconCommittee.d.ts +34 -0
- package/src/proposals/startEconCommittee.d.ts.map +1 -0
- package/src/proposals/startPSM.d.ts +61 -0
- package/src/proposals/startPSM.d.ts.map +1 -0
- package/src/proposals/startPSM.js +8 -7
- package/src/proposals/utils.d.ts +15 -0
- package/src/proposals/utils.d.ts.map +1 -0
- package/src/psm/psm.d.ts +193 -0
- package/src/psm/psm.d.ts.map +1 -0
- package/src/psm/types.d.ts +2 -0
- package/src/psm/types.d.ts.map +1 -0
- package/src/reserve/assetReserve.d.ts +42 -0
- package/src/reserve/assetReserve.d.ts.map +1 -0
- package/src/reserve/assetReserveKit.d.ts +126 -0
- package/src/reserve/assetReserveKit.d.ts.map +1 -0
- package/src/reserve/params.d.ts +10 -0
- package/src/reserve/params.d.ts.map +1 -0
- package/src/tokens.d.ts +36 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/typeGuards.d.ts +5 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/vaultFactory/burn.d.ts +2 -0
- package/src/vaultFactory/burn.d.ts.map +1 -0
- package/src/vaultFactory/liquidation.d.ts +24 -0
- package/src/vaultFactory/liquidation.d.ts.map +1 -0
- package/src/vaultFactory/math.d.ts +10 -0
- package/src/vaultFactory/math.d.ts.map +1 -0
- package/src/vaultFactory/orderedVaultStore.d.ts +94 -0
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
- package/src/vaultFactory/params.d.ts +162 -0
- package/src/vaultFactory/params.d.ts.map +1 -0
- package/src/vaultFactory/prioritizedVaults.d.ts +279 -0
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
- package/src/vaultFactory/proceeds.d.ts +34 -0
- package/src/vaultFactory/proceeds.d.ts.map +1 -0
- package/src/vaultFactory/storeUtils.d.ts +29 -0
- package/src/vaultFactory/storeUtils.d.ts.map +1 -0
- package/src/vaultFactory/type-imports.d.ts +2 -0
- package/src/vaultFactory/type-imports.d.ts.map +1 -0
- package/src/vaultFactory/types.d.ts +132 -0
- package/src/vaultFactory/types.d.ts.map +1 -0
- package/src/vaultFactory/vault.d.ts +585 -0
- package/src/vaultFactory/vault.d.ts.map +1 -0
- package/src/vaultFactory/vaultDirector.d.ts +582 -0
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
- package/src/vaultFactory/vaultFactory.d.ts +159 -0
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
- package/src/vaultFactory/vaultHolder.d.ts +205 -0
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
- package/src/vaultFactory/vaultKit.d.ts +32 -0
- package/src/vaultFactory/vaultKit.d.ts.map +1 -0
- package/src/vaultFactory/vaultManager.d.ts +552 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -0
|
@@ -0,0 +1,129 @@
|
|
|
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<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand' | 'vbankAsset'>} agoricNames
|
|
24
|
+
* @param {{
|
|
25
|
+
* offerId: string,
|
|
26
|
+
* give: string,
|
|
27
|
+
* maxBuy: string,
|
|
28
|
+
* wantMinimum?: string,
|
|
29
|
+
* } & ({
|
|
30
|
+
* price: number,
|
|
31
|
+
* } | {
|
|
32
|
+
* discount: number, // -1 to 1. e.g. 0.10 for 10% discount, -0.05 for 5% markup
|
|
33
|
+
* })} opts
|
|
34
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
35
|
+
*/
|
|
36
|
+
declare function makeBidOffer(agoricNames: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand' | 'vbankAsset'>, opts: {
|
|
37
|
+
offerId: string;
|
|
38
|
+
give: string;
|
|
39
|
+
maxBuy: string;
|
|
40
|
+
wantMinimum?: string | undefined;
|
|
41
|
+
} & ({
|
|
42
|
+
price: number;
|
|
43
|
+
} | {
|
|
44
|
+
discount: number;
|
|
45
|
+
})): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @param {unknown} _agoricNames
|
|
49
|
+
* @param {{
|
|
50
|
+
* offerId: string,
|
|
51
|
+
* roundId?: bigint,
|
|
52
|
+
* unitPrice: bigint,
|
|
53
|
+
* }} opts
|
|
54
|
+
* @param {string} previousOffer
|
|
55
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
56
|
+
*/
|
|
57
|
+
declare function makePushPriceOffer(_agoricNames: unknown, opts: {
|
|
58
|
+
offerId: string;
|
|
59
|
+
roundId?: bigint;
|
|
60
|
+
unitPrice: bigint;
|
|
61
|
+
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
62
|
+
/**
|
|
63
|
+
* @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>} agoricNames
|
|
64
|
+
* @param {Instance} instance
|
|
65
|
+
* @param {{ offerId: string, feePct?: number, pair: [string, string] } &
|
|
66
|
+
* ({ wantMinted: number } | { giveMinted: number })} opts
|
|
67
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
68
|
+
*/
|
|
69
|
+
declare function makePsmSwapOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, instance: Instance, opts: {
|
|
70
|
+
offerId: string;
|
|
71
|
+
feePct?: number;
|
|
72
|
+
pair: [string, string];
|
|
73
|
+
} & ({
|
|
74
|
+
wantMinted: number;
|
|
75
|
+
} | {
|
|
76
|
+
giveMinted: number;
|
|
77
|
+
})): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
78
|
+
/**
|
|
79
|
+
* @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>} agoricNames
|
|
80
|
+
* @param {{ offerId: string, wantMinted: number, giveCollateral: number, collateralBrandKey: string }} opts
|
|
81
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
82
|
+
*/
|
|
83
|
+
declare function makeOpenOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
84
|
+
offerId: string;
|
|
85
|
+
wantMinted: number;
|
|
86
|
+
giveCollateral: number;
|
|
87
|
+
collateralBrandKey: string;
|
|
88
|
+
}): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
89
|
+
/**
|
|
90
|
+
* @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>} agoricNames
|
|
91
|
+
* @param {{ offerId: string, collateralBrandKey?: string, giveCollateral?: number, wantCollateral?: number, giveMinted?: number, wantMinted?: number }} opts
|
|
92
|
+
* @param {string} previousOffer
|
|
93
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
94
|
+
*/
|
|
95
|
+
declare function makeAdjustOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
96
|
+
offerId: string;
|
|
97
|
+
collateralBrandKey?: string;
|
|
98
|
+
giveCollateral?: number;
|
|
99
|
+
wantCollateral?: number;
|
|
100
|
+
giveMinted?: number;
|
|
101
|
+
wantMinted?: number;
|
|
102
|
+
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
103
|
+
/**
|
|
104
|
+
* @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>} agoricNames
|
|
105
|
+
* @param {{ offerId: string, collateralBrandKey?: string, giveMinted: number }} opts
|
|
106
|
+
* @param {string} previousOffer
|
|
107
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
108
|
+
*/
|
|
109
|
+
declare function makeCloseOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
110
|
+
offerId: string;
|
|
111
|
+
collateralBrandKey?: string;
|
|
112
|
+
giveMinted: number;
|
|
113
|
+
}, previousOffer: string): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
114
|
+
/**
|
|
115
|
+
* @param {Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>} agoricNames
|
|
116
|
+
* @param {{
|
|
117
|
+
* offerId: string,
|
|
118
|
+
* give: number,
|
|
119
|
+
* collateralBrandKey: string,
|
|
120
|
+
* }} opts
|
|
121
|
+
* @returns {import('@agoric/smart-wallet/src/offers.js').OfferSpec}
|
|
122
|
+
*/
|
|
123
|
+
declare function makeAddCollateralOffer({ brand }: Pick<import('@agoric/vats/tools/board-utils.js').AgoricNamesRemotes, 'brand'>, opts: {
|
|
124
|
+
offerId: string;
|
|
125
|
+
give: number;
|
|
126
|
+
collateralBrandKey: string;
|
|
127
|
+
}): import('@agoric/smart-wallet/src/offers.js').OfferSpec;
|
|
128
|
+
export {};
|
|
129
|
+
//# sourceMappingURL=clientSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientSupport.d.ts","sourceRoot":"","sources":["clientSupport.js"],"names":[],"mappings":"AAmIO,+CAJI,MAAM,YACN,QAAQ,OAAO,sCAAsC,EAAE,mBAAmB,CAAC,GACzE,QAAQ,MAAM,CAAC,CAW3B;AAuEM,6CAJI,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,GAAG,YAAY,CAAC,oBACtF,MAAM,KAAK,KAAK,OAChB,MAAM,KAAK,OAAO,KAAK,CAAC,CAiCtC;;;;;;;;;;;;;;;;;;;;AAEH;;;;;;;;;;;;;GAaG;AACH,2CAbW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,GAAG,YAAY,CAAC;aAEzF,MAAM;UACT,MAAM;YACJ,MAAM;;;WAGP,MAAM;;cAEH,MAAM;KAER,OAAO,oCAAoC,EAAE,SAAS,CAuDlE;AAkCD;;;;;;;;;;GAUG;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;AAtMD;;;;;;GAMG;AACH,6CANW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,CAAC,YAC7E,QAAQ,QACR;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACtE,CAAW;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAC/C,OAAO,oCAAoC,EAAE,SAAS,CA4BlE;AArJD;;;;GAIG;AACH,0CAJW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,CAAC,QAC7E;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,GACzF,OAAO,oCAAoC,EAAE,SAAS,CAuBlE;AAED;;;;;GAKG;AACH,4CALW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,CAAC,QAC7E;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,iBAC5I,MAAM,GACJ,OAAO,oCAAoC,EAAE,SAAS,CAiBlE;AAED;;;;;GAKG;AACH,2CALW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,CAAC,QAC7E;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,iBACpE,MAAM,GACJ,OAAO,oCAAoC,EAAE,SAAS,CAclE;AA6LD;;;;;;;;GAQG;AACH,mDARW,KAAK,OAAO,mCAAmC,EAAE,kBAAkB,EAAE,OAAO,CAAC;aAE1E,MAAM;UACT,MAAM;wBACQ,MAAM;IAElB,OAAO,oCAAoC,EAAE,SAAS,CAuBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export namespace amountPattern {
|
|
2
|
+
let brand: import("@endo/patterns").Matcher;
|
|
3
|
+
let value: import("@endo/patterns").Matcher;
|
|
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: import("@endo/patterns").Matcher;
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* This contract makes it possible for those who govern contracts to call for
|
|
5
|
+
* votes on changes. A more complete implementation would validate parameters,
|
|
6
|
+
* constrain deadlines and possibly split the ability to call for votes into
|
|
7
|
+
* separate capabilities for finer grain encapsulation.
|
|
8
|
+
*/
|
|
9
|
+
export const INVITATION_MAKERS_DESC: "charter member invitation";
|
|
10
|
+
export namespace customTermsShape {
|
|
11
|
+
export { InstallationShape as binaryVoteCounterInstallation };
|
|
12
|
+
}
|
|
13
|
+
export function prepare(zcf: ZCF<{
|
|
14
|
+
binaryVoteCounterInstallation: Installation;
|
|
15
|
+
}>, privateArgs: undefined, baggage: MapStore<string, unknown>): Promise<{
|
|
16
|
+
creatorFacet: {
|
|
17
|
+
/**
|
|
18
|
+
* @param {Instance} governedInstance
|
|
19
|
+
* @param {GovernorCreatorFacet<any>} governorFacet
|
|
20
|
+
* @param {string} [label] for diagnostic use only
|
|
21
|
+
*/
|
|
22
|
+
addInstance: (governedInstance: Instance, governorFacet: GovernorCreatorFacet<any>, label?: string | undefined) => void;
|
|
23
|
+
makeCharterMemberInvitation: () => Promise<Invitation<R, A>>;
|
|
24
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
25
|
+
/**
|
|
26
|
+
* @param {Instance} governedInstance
|
|
27
|
+
* @param {GovernorCreatorFacet<any>} governorFacet
|
|
28
|
+
* @param {string} [label] for diagnostic use only
|
|
29
|
+
*/
|
|
30
|
+
addInstance: (governedInstance: Instance, governorFacet: GovernorCreatorFacet<any>, label?: string | undefined) => void;
|
|
31
|
+
makeCharterMemberInvitation: () => Promise<Invitation<R, A>>;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
export type ParamChangesOfferArgs = {
|
|
35
|
+
deadline: bigint;
|
|
36
|
+
instance: Instance;
|
|
37
|
+
params: Record<string, unknown>;
|
|
38
|
+
path?: {
|
|
39
|
+
paramPath: {
|
|
40
|
+
key: string;
|
|
41
|
+
};
|
|
42
|
+
} | undefined;
|
|
43
|
+
};
|
|
44
|
+
import { InstallationShape } from '@agoric/zoe/src/typeGuards.js';
|
|
45
|
+
//# sourceMappingURL=econCommitteeCharter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AAEH,iEAAkE;;;;AAgC3D,6BAJI,IAAI;IAAC,6BAA6B,EAAE,YAAY,CAAA;CAAC,CAAC,eAClD,SAAS;;QAsHd;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;QAFpC;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;GAazC;;cA9Ja,MAAM;cACN,QAAQ;YACR,OAAO,MAAM,EAAE,OAAO,CAAC;;mBACX;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE;;;kCAnBlC,+BAA+B"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
export namespace customTermsShape {
|
|
2
|
+
export { KeywordSharesShape as keywordShares };
|
|
3
|
+
export let timerService: any;
|
|
4
|
+
export { RelativeTimeShape as collectionInterval };
|
|
5
|
+
}
|
|
6
|
+
export function makeContractFeeCollector(zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>): {
|
|
7
|
+
collectFees: () => Promise<Payment<any>>;
|
|
8
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
9
|
+
collectFees: () => Promise<Payment<any>>;
|
|
10
|
+
}>;
|
|
11
|
+
export function startDistributing(schedulePayments: () => Promise<unknown>, timerService: ERef<TimerService>, collectionInterval?: import("@agoric/time/src/types").RelativeTime | undefined): void;
|
|
12
|
+
export function makeShareConfig(destinations?: Record<string, ERef<FeeDestination>> | undefined, keywordShares?: Record<string, bigint> | undefined): {
|
|
13
|
+
shares: {
|
|
14
|
+
share: bigint;
|
|
15
|
+
destination: ERef<FeeDestination>;
|
|
16
|
+
}[];
|
|
17
|
+
totalShares: bigint;
|
|
18
|
+
};
|
|
19
|
+
export function sharePayment(payment: Payment<'nat'>, issuer: ERef<Issuer<'nat'>>, { shares, totalShares }: ShareConfig): Promise<void>;
|
|
20
|
+
export function makeFeeDistributor(feeIssuer: ERef<Issuer<'nat'>>, terms: {
|
|
21
|
+
keywordShares: Record<Keyword, NatValue>;
|
|
22
|
+
timerService: ERef<TimerService>;
|
|
23
|
+
collectionInterval: RelativeTime;
|
|
24
|
+
}): {
|
|
25
|
+
creatorFacet: {
|
|
26
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
27
|
+
collectFees: () => Promise<Payment<any>>;
|
|
28
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
29
|
+
collectFees: () => Promise<Payment<any>>;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Start distributing fees from this collector.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} debugName
|
|
35
|
+
* @param {ERef<FeeCollector>} collectorP
|
|
36
|
+
*/
|
|
37
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
38
|
+
/**
|
|
39
|
+
* @param {import('@endo/far').EOnly<DepositFacet>} depositFacet
|
|
40
|
+
*/
|
|
41
|
+
makeDepositFacetDestination: (depositFacet: import('@endo/far').EOnly<DepositFacet>) => {
|
|
42
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
43
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
44
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Create a destination that generates invitations and makes Zoe offers.
|
|
48
|
+
*
|
|
49
|
+
* @param {ERef<ZoeService>} zoe
|
|
50
|
+
* @param {string} keyword
|
|
51
|
+
* @param {unknown} target
|
|
52
|
+
* @param {PropertyKey} makeInvitationMethod
|
|
53
|
+
* @param {unknown[]} [args]
|
|
54
|
+
*/
|
|
55
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
56
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
57
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
58
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
|
|
62
|
+
*/
|
|
63
|
+
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
64
|
+
/** @param {Record<Keyword, bigint>} newShares */
|
|
65
|
+
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
66
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
67
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
68
|
+
collectFees: () => Promise<Payment<any>>;
|
|
69
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
70
|
+
collectFees: () => Promise<Payment<any>>;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Start distributing fees from this collector.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} debugName
|
|
76
|
+
* @param {ERef<FeeCollector>} collectorP
|
|
77
|
+
*/
|
|
78
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
79
|
+
/**
|
|
80
|
+
* @param {import('@endo/far').EOnly<DepositFacet>} depositFacet
|
|
81
|
+
*/
|
|
82
|
+
makeDepositFacetDestination: (depositFacet: import('@endo/far').EOnly<DepositFacet>) => {
|
|
83
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
84
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
85
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Create a destination that generates invitations and makes Zoe offers.
|
|
89
|
+
*
|
|
90
|
+
* @param {ERef<ZoeService>} zoe
|
|
91
|
+
* @param {string} keyword
|
|
92
|
+
* @param {unknown} target
|
|
93
|
+
* @param {PropertyKey} makeInvitationMethod
|
|
94
|
+
* @param {unknown[]} [args]
|
|
95
|
+
*/
|
|
96
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
97
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
98
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
99
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
100
|
+
}>;
|
|
101
|
+
/**
|
|
102
|
+
* @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
|
|
103
|
+
*/
|
|
104
|
+
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
105
|
+
/** @param {Record<Keyword, bigint>} newShares */
|
|
106
|
+
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
107
|
+
}>;
|
|
108
|
+
publicFacet: {
|
|
109
|
+
distributeFees: (payment: Payment<'nat'>) => Promise<void>;
|
|
110
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
111
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
112
|
+
distributeFees: (payment: Payment<'nat'>) => Promise<void>;
|
|
113
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
export function start(zcf: ZCF<[feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
117
|
+
keywordShares: Record<Keyword, NatValue>;
|
|
118
|
+
timerService: ERef<TimerService>;
|
|
119
|
+
collectionInterval: RelativeTime;
|
|
120
|
+
}][1]>): Promise<{
|
|
121
|
+
creatorFacet: {
|
|
122
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
123
|
+
collectFees: () => Promise<Payment<any>>;
|
|
124
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
125
|
+
collectFees: () => Promise<Payment<any>>;
|
|
126
|
+
}>;
|
|
127
|
+
/**
|
|
128
|
+
* Start distributing fees from this collector.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} debugName
|
|
131
|
+
* @param {ERef<FeeCollector>} collectorP
|
|
132
|
+
*/
|
|
133
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
134
|
+
/**
|
|
135
|
+
* @param {import('@endo/far').EOnly<DepositFacet>} depositFacet
|
|
136
|
+
*/
|
|
137
|
+
makeDepositFacetDestination: (depositFacet: import('@endo/far').EOnly<DepositFacet>) => {
|
|
138
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
139
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
140
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* Create a destination that generates invitations and makes Zoe offers.
|
|
144
|
+
*
|
|
145
|
+
* @param {ERef<ZoeService>} zoe
|
|
146
|
+
* @param {string} keyword
|
|
147
|
+
* @param {unknown} target
|
|
148
|
+
* @param {PropertyKey} makeInvitationMethod
|
|
149
|
+
* @param {unknown[]} [args]
|
|
150
|
+
*/
|
|
151
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
152
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
153
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
154
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
155
|
+
}>;
|
|
156
|
+
/**
|
|
157
|
+
* @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
|
|
158
|
+
*/
|
|
159
|
+
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
160
|
+
/** @param {Record<Keyword, bigint>} newShares */
|
|
161
|
+
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
162
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
163
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
164
|
+
collectFees: () => Promise<Payment<any>>;
|
|
165
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
166
|
+
collectFees: () => Promise<Payment<any>>;
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* Start distributing fees from this collector.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} debugName
|
|
172
|
+
* @param {ERef<FeeCollector>} collectorP
|
|
173
|
+
*/
|
|
174
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
175
|
+
/**
|
|
176
|
+
* @param {import('@endo/far').EOnly<DepositFacet>} depositFacet
|
|
177
|
+
*/
|
|
178
|
+
makeDepositFacetDestination: (depositFacet: import('@endo/far').EOnly<DepositFacet>) => {
|
|
179
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
180
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
181
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
182
|
+
}>;
|
|
183
|
+
/**
|
|
184
|
+
* Create a destination that generates invitations and makes Zoe offers.
|
|
185
|
+
*
|
|
186
|
+
* @param {ERef<ZoeService>} zoe
|
|
187
|
+
* @param {string} keyword
|
|
188
|
+
* @param {unknown} target
|
|
189
|
+
* @param {PropertyKey} makeInvitationMethod
|
|
190
|
+
* @param {unknown[]} [args]
|
|
191
|
+
*/
|
|
192
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
193
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
194
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
195
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
|
|
199
|
+
*/
|
|
200
|
+
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
201
|
+
/** @param {Record<Keyword, bigint>} newShares */
|
|
202
|
+
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
203
|
+
}>;
|
|
204
|
+
publicFacet: {
|
|
205
|
+
distributeFees: (payment: Payment<'nat'>) => Promise<void>;
|
|
206
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
207
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
208
|
+
distributeFees: (payment: Payment<'nat'>) => Promise<void>;
|
|
209
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
210
|
+
}>;
|
|
211
|
+
}>;
|
|
212
|
+
export type RelativeTime = import('@agoric/time/src/types').RelativeTime;
|
|
213
|
+
export type TimerService = import('@agoric/time/src/types').TimerService;
|
|
214
|
+
export type FeeCollector = {
|
|
215
|
+
collectFees: () => ERef<Payment<'nat'>>;
|
|
216
|
+
};
|
|
217
|
+
export type PeriodicFeeCollector = {
|
|
218
|
+
getCollector: () => FeeCollector;
|
|
219
|
+
collectAndDistributeNow: () => Promise<void>;
|
|
220
|
+
stop: () => void;
|
|
221
|
+
};
|
|
222
|
+
export type CollectibleContractFacet = {
|
|
223
|
+
makeCollectFeesInvitation: () => Promise<Invitation<string, never>>;
|
|
224
|
+
};
|
|
225
|
+
export type FeeDestination = {
|
|
226
|
+
pushPayment: (payment: Payment, issuer: ERef<Issuer>) => Promise<Amount>;
|
|
227
|
+
};
|
|
228
|
+
export type ShareConfig = ReturnType<typeof makeShareConfig>;
|
|
229
|
+
export type FeeDistributorCreatorFacet = ReturnType<typeof makeFeeDistributor>['creatorFacet'];
|
|
230
|
+
export type FeeDistributorPublicFacet = ReturnType<typeof makeFeeDistributor>['publicFacet'];
|
|
231
|
+
declare const KeywordSharesShape: import("@endo/patterns").Matcher;
|
|
232
|
+
import { RelativeTimeShape } from '@agoric/time';
|
|
233
|
+
export {};
|
|
234
|
+
//# sourceMappingURL=feeDistributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"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"}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export function calculateCurrentDebt(debtSnapshot: Amount<'nat'>, stabilityFeeSnapshot: Ratio, currentCompoundedStabilityFee: Ratio): Amount<'nat'>;
|
|
2
|
+
export function reverseInterest(debt: Amount<'nat'>, interestApplied: Ratio): Amount<'nat'>;
|
|
3
|
+
//# sourceMappingURL=interest-math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"AAgCO,mDALI,OAAO,KAAK,CAAC,wBACb,KAAK,iCACL,KAAK,GACH,OAAO,KAAK,CAAC,CAiBzB;AAOM,sCAJI,OAAO,KAAK,CAAC,mBACb,KAAK,GACH,OAAO,KAAK,CAAC,CAIzB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('@agoric/time/src/types').Timestamp} Timestamp
|
|
3
|
+
* @typedef {import('@agoric/time/src/types').RelativeTime} RelativeTime
|
|
4
|
+
*/
|
|
5
|
+
export const SECONDS_PER_YEAR: bigint;
|
|
6
|
+
export function makeInterestCalculator(annualRate: Ratio, chargingPeriod: RelativeTime, recordingPeriod: RelativeTime): CalculatorKit;
|
|
7
|
+
export function calculateCompoundedStabilityFee(priorCompoundedStabilityFee: Ratio, priorDebt: NatValue, newDebt: NatValue): Ratio;
|
|
8
|
+
export function chargeInterest(powers: {
|
|
9
|
+
mint: ZCFMint<'nat'>;
|
|
10
|
+
mintAndTransferWithFee: MintAndTransfer;
|
|
11
|
+
poolIncrementSeat: ZCFSeat;
|
|
12
|
+
seatAllocationKeyword: Keyword;
|
|
13
|
+
}, params: {
|
|
14
|
+
stabilityFee: Ratio;
|
|
15
|
+
chargingPeriod: RelativeTime;
|
|
16
|
+
recordingPeriod: RelativeTime;
|
|
17
|
+
}, prior: {
|
|
18
|
+
latestStabilityFeeUpdate: Timestamp;
|
|
19
|
+
compoundedStabilityFee: Ratio;
|
|
20
|
+
totalDebt: Amount<'nat'>;
|
|
21
|
+
}, accruedUntil: Timestamp): {
|
|
22
|
+
compoundedStabilityFee: Ratio;
|
|
23
|
+
latestStabilityFeeUpdate: Timestamp;
|
|
24
|
+
totalDebt: Amount<'nat'>;
|
|
25
|
+
};
|
|
26
|
+
export type Timestamp = import('@agoric/time/src/types').Timestamp;
|
|
27
|
+
export type RelativeTime = import('@agoric/time/src/types').RelativeTime;
|
|
28
|
+
//# sourceMappingURL=interest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"AAYA;;;GAGG;AAEH,sCAAuD;AAgBhD,mDALI,KAAK,kBACL,YAAY,mBACZ,YAAY,GACV,aAAa,CA+EzB;AASM,6EAJI,KAAK,aACL,QAAQ,WACR,QAAQ,SAalB;AAkCM,uCAhBI;IACV,IAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;IACxB,sBAAyB,EAAE,eAAe,CAAC;IAC3C,iBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAwB,EAAE,OAAO,CAAA;CAAE,UACzB;IACV,YAAe,EAAE,KAAK,CAAC;IACvB,cAAiB,EAAE,YAAY,CAAC;IAChC,eAAkB,EAAE,YAAY,CAAA;CAAC;8BAEJ,SAAS;4BACX,KAAK;eAClB,OAAO,KAAK,CAAC;iBACjB,SAAS;4BACkB,KAAK;8BAA4B,SAAS;eAAa,OAAO,KAAK,CAAC;EA8DzG;wBAnNY,OAAO,wBAAwB,EAAE,SAAS;2BAC1C,OAAO,wBAAwB,EAAE,YAAY"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('@agoric/vat-data').Baggage} Baggage
|
|
3
|
+
* @typedef {import('@agoric/time/src/types').TimerService} TimerService
|
|
4
|
+
*/
|
|
5
|
+
export const privateArgsShape: import("@endo/patterns").Matcher;
|
|
6
|
+
export function prepare(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig & {
|
|
7
|
+
timer: TimerService;
|
|
8
|
+
brandIn: Brand<'nat'>;
|
|
9
|
+
brandOut: Brand<'nat'>;
|
|
10
|
+
description: string;
|
|
11
|
+
unitAmountIn?: Amount<"nat"> | undefined;
|
|
12
|
+
}>, privateArgs: {
|
|
13
|
+
highPrioritySendersManager?: ({
|
|
14
|
+
add: (rawNamespace: string, address: string) => Promise<void>;
|
|
15
|
+
remove: (rawNamespace: string, address: string) => Promise<void>;
|
|
16
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
17
|
+
add: (rawNamespace: string, address: string) => Promise<void>;
|
|
18
|
+
remove: (rawNamespace: string, address: string) => Promise<void>;
|
|
19
|
+
}>) | undefined;
|
|
20
|
+
initialPoserInvitation: Invitation;
|
|
21
|
+
marshaller: ERef<Marshaller>;
|
|
22
|
+
namesByAddressAdmin: ERef<import('@agoric/vats').NameAdmin>;
|
|
23
|
+
storageNode: StorageNode;
|
|
24
|
+
}, baggage: MapStore<string, unknown>): Promise<{
|
|
25
|
+
creatorFacet: {
|
|
26
|
+
getParamMgrRetriever: () => {
|
|
27
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
28
|
+
Electorate: "invitation";
|
|
29
|
+
}>;
|
|
30
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
31
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
32
|
+
Electorate: "invitation";
|
|
33
|
+
}>;
|
|
34
|
+
}>;
|
|
35
|
+
getInvitation: (name: any) => Promise<Invitation<R, A>>;
|
|
36
|
+
getLimitedCreatorFacet: () => {
|
|
37
|
+
makeOracleInvitation(oracleId: string): Promise<Invitation<R, A>>;
|
|
38
|
+
removeOracle(oracleId: string): Promise<void>;
|
|
39
|
+
getRoundData: (roundIdRaw: any) => Promise<import("./roundsManager.js").RoundData>;
|
|
40
|
+
initOracle(oracleId: string): Promise<{
|
|
41
|
+
admin: {
|
|
42
|
+
disable(): void;
|
|
43
|
+
};
|
|
44
|
+
oracle: {
|
|
45
|
+
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: import("./priceOracleKit.js").PriceDatum): Promise<void>;
|
|
46
|
+
getStatus(): import("./priceOracleKit.js").OracleStatus;
|
|
47
|
+
};
|
|
48
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
49
|
+
admin: {
|
|
50
|
+
disable(): void;
|
|
51
|
+
};
|
|
52
|
+
oracle: {
|
|
53
|
+
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: import("./priceOracleKit.js").PriceDatum): Promise<void>;
|
|
54
|
+
getStatus(): import("./priceOracleKit.js").OracleStatus;
|
|
55
|
+
};
|
|
56
|
+
}>>;
|
|
57
|
+
oracleRoundState(oracleId: string, queriedRoundId: bigint): Promise<import("./fluxAggregatorKit.js").RoundState>;
|
|
58
|
+
};
|
|
59
|
+
getGovernedApis: () => GovernedApis;
|
|
60
|
+
getGovernedApiNames: () => string[];
|
|
61
|
+
setOfferFilter: (strings: any) => Promise<void>;
|
|
62
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
63
|
+
getParamMgrRetriever: () => {
|
|
64
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
65
|
+
Electorate: "invitation";
|
|
66
|
+
}>;
|
|
67
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
68
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
69
|
+
Electorate: "invitation";
|
|
70
|
+
}>;
|
|
71
|
+
}>;
|
|
72
|
+
getInvitation: (name: any) => Promise<Invitation<R, A>>;
|
|
73
|
+
getLimitedCreatorFacet: () => {
|
|
74
|
+
makeOracleInvitation(oracleId: string): Promise<Invitation<R, A>>;
|
|
75
|
+
removeOracle(oracleId: string): Promise<void>;
|
|
76
|
+
getRoundData: (roundIdRaw: any) => Promise<import("./roundsManager.js").RoundData>;
|
|
77
|
+
initOracle(oracleId: string): Promise<{
|
|
78
|
+
admin: {
|
|
79
|
+
disable(): void;
|
|
80
|
+
};
|
|
81
|
+
oracle: {
|
|
82
|
+
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: import("./priceOracleKit.js").PriceDatum): Promise<void>;
|
|
83
|
+
getStatus(): import("./priceOracleKit.js").OracleStatus;
|
|
84
|
+
};
|
|
85
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
86
|
+
admin: {
|
|
87
|
+
disable(): void;
|
|
88
|
+
};
|
|
89
|
+
oracle: {
|
|
90
|
+
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: import("./priceOracleKit.js").PriceDatum): Promise<void>;
|
|
91
|
+
getStatus(): import("./priceOracleKit.js").OracleStatus;
|
|
92
|
+
};
|
|
93
|
+
}>>;
|
|
94
|
+
oracleRoundState(oracleId: string, queriedRoundId: bigint): Promise<import("./fluxAggregatorKit.js").RoundState>;
|
|
95
|
+
};
|
|
96
|
+
getGovernedApis: () => GovernedApis;
|
|
97
|
+
getGovernedApiNames: () => string[];
|
|
98
|
+
setOfferFilter: (strings: any) => Promise<void>;
|
|
99
|
+
}>;
|
|
100
|
+
publicFacet: {
|
|
101
|
+
getPriceAuthority(): PriceAuthority;
|
|
102
|
+
getPublicTopics(): {
|
|
103
|
+
quotes: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<PriceDescription>;
|
|
104
|
+
latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("./roundsManager.js").LatestRound>;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
export type Baggage = import('@agoric/vat-data').Baggage;
|
|
109
|
+
export type TimerService = import('@agoric/time/src/types').TimerService;
|
|
110
|
+
//# sourceMappingURL=fluxAggregatorContract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAkBA;;;GAGG;AAEH,gEAeE;AAuBK;WAfG,YAAY;aACV,MAAM,KAAK,CAAC;cACX,MAAM,KAAK,CAAC;iBACT,MAAM;;;;;;;;;;4BAKK,UAAU;gBACtB,KAAK,UAAU,CAAC;yBACP,KAAK,OAAO,cAAc,EAAE,SAAS,CAAC;iBAC9C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+H1B;sBArKY,OAAO,kBAAkB,EAAE,OAAO;2BAClC,OAAO,wBAAwB,EAAE,YAAY"}
|