@agoric/inter-protocol 0.16.1 → 0.16.2-calypso-dev-84eb287.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/README.md +6 -6
- package/package.json +41 -36
- package/scripts/build-bundles.js +5 -21
- package/src/auction/auctionBook.d.ts +147 -0
- package/src/auction/auctionBook.d.ts.map +1 -0
- package/src/auction/auctionBook.js +135 -103
- package/src/auction/auctioneer.d.ts +69 -0
- package/src/auction/auctioneer.d.ts.map +1 -0
- package/src/auction/auctioneer.js +63 -49
- package/src/auction/offerBook.d.ts +45 -0
- package/src/auction/offerBook.d.ts.map +1 -0
- package/src/auction/offerBook.js +13 -12
- package/src/auction/params.d.ts +144 -0
- package/src/auction/params.d.ts.map +1 -0
- package/src/auction/params.js +10 -9
- package/src/auction/scheduleMath.d.ts +5 -0
- package/src/auction/scheduleMath.d.ts.map +1 -0
- package/src/auction/scheduleMath.js +17 -15
- package/src/auction/scheduler.d.ts +49 -0
- package/src/auction/scheduler.d.ts.map +1 -0
- package/src/auction/scheduler.js +51 -43
- package/src/auction/sortedOffers.d.ts +8 -0
- package/src/auction/sortedOffers.d.ts.map +1 -0
- package/src/auction/sortedOffers.js +9 -7
- package/src/auction/util.d.ts +32 -0
- package/src/auction/util.d.ts.map +1 -0
- package/src/auction/util.js +6 -4
- package/src/clientSupport.d.ts +167 -0
- package/src/clientSupport.d.ts.map +1 -0
- package/src/clientSupport.js +154 -96
- package/src/collectFees.d.ts +2 -0
- package/src/collectFees.d.ts.map +1 -0
- package/src/contractSupport.d.ts +28 -0
- package/src/contractSupport.d.ts.map +1 -0
- package/src/contractSupport.js +14 -12
- package/src/econCommitteeCharter.d.ts +39 -0
- package/src/econCommitteeCharter.d.ts.map +1 -0
- package/src/econCommitteeCharter.js +21 -20
- package/src/feeDistributor.d.ts +224 -0
- package/src/feeDistributor.d.ts.map +1 -0
- package/src/feeDistributor.js +37 -33
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +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/interest.js +21 -16
- package/src/price/README.md +13 -0
- package/src/price/fluxAggregatorContract.d.ts +70 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -0
- package/src/price/fluxAggregatorContract.js +62 -55
- package/src/price/fluxAggregatorKit.d.ts +103 -0
- package/src/price/fluxAggregatorKit.d.ts.map +1 -0
- package/src/price/fluxAggregatorKit.js +50 -37
- package/src/price/priceOracleKit.d.ts +38 -0
- package/src/price/priceOracleKit.d.ts.map +1 -0
- package/src/price/priceOracleKit.js +11 -13
- package/src/price/roundsManager.d.ts +204 -0
- package/src/price/roundsManager.d.ts.map +1 -0
- package/src/price/roundsManager.js +79 -82
- package/src/proposals/README.md +2 -3
- package/src/proposals/add-auction.d.ts +69 -0
- package/src/proposals/add-auction.d.ts.map +1 -0
- package/src/proposals/add-auction.js +180 -0
- package/src/proposals/addAssetToVault.d.ts +160 -0
- package/src/proposals/addAssetToVault.d.ts.map +1 -0
- package/src/proposals/addAssetToVault.js +172 -38
- package/src/proposals/committee-proposal.d.ts +113 -0
- package/src/proposals/committee-proposal.d.ts.map +1 -0
- package/src/proposals/committee-proposal.js +25 -31
- package/src/proposals/core-proposal.d.ts +149 -0
- package/src/proposals/core-proposal.d.ts.map +1 -0
- package/src/proposals/core-proposal.js +9 -11
- package/src/proposals/econ-behaviors.d.ts +539 -0
- package/src/proposals/econ-behaviors.d.ts.map +1 -0
- package/src/proposals/econ-behaviors.js +64 -45
- package/src/proposals/price-feed-proposal.d.ts +84 -0
- package/src/proposals/price-feed-proposal.d.ts.map +1 -0
- package/src/proposals/price-feed-proposal.js +108 -51
- package/src/proposals/startEconCommittee.d.ts +34 -0
- package/src/proposals/startEconCommittee.d.ts.map +1 -0
- package/src/proposals/startEconCommittee.js +2 -2
- package/src/proposals/startPSM.d.ts +59 -0
- package/src/proposals/startPSM.d.ts.map +1 -0
- package/src/proposals/startPSM.js +38 -27
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +24 -0
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +1 -0
- package/src/proposals/upgrade-scaledPriceAuthorities.js +78 -0
- package/src/proposals/upgrade-vaults.d.ts +35 -0
- package/src/proposals/upgrade-vaults.d.ts.map +1 -0
- package/src/proposals/upgrade-vaults.js +235 -0
- package/src/proposals/utils.d.ts +17 -0
- package/src/proposals/utils.d.ts.map +1 -0
- package/src/proposals/utils.js +34 -7
- package/src/provisionPool.d.ts +167 -0
- package/src/provisionPool.d.ts.map +1 -0
- package/src/provisionPool.js +122 -0
- package/src/provisionPoolKit.d.ts +367 -0
- package/src/provisionPoolKit.d.ts.map +1 -0
- package/src/provisionPoolKit.js +522 -0
- package/src/psm/psm.d.ts +122 -0
- package/src/psm/psm.d.ts.map +1 -0
- package/src/psm/psm.js +73 -69
- package/src/psm/types-ambient.d.ts +2 -0
- package/src/psm/types-ambient.d.ts.map +1 -0
- package/src/psm/types-ambient.js +3 -0
- package/src/reserve/assetReserve.d.ts +47 -0
- package/src/reserve/assetReserve.d.ts.map +1 -0
- package/src/reserve/assetReserve.js +28 -19
- package/src/reserve/assetReserveKit.d.ts +74 -0
- package/src/reserve/assetReserveKit.d.ts.map +1 -0
- package/src/reserve/assetReserveKit.js +18 -24
- package/src/reserve/params.d.ts +10 -0
- package/src/reserve/params.d.ts.map +1 -0
- package/src/tokens.d.ts +3 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/tokens.js +5 -0
- package/src/vaultFactory/burn.d.ts +2 -0
- package/src/vaultFactory/burn.d.ts.map +1 -0
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +23 -0
- package/src/vaultFactory/liquidation.d.ts.map +1 -0
- package/src/vaultFactory/liquidation.js +36 -22
- package/src/vaultFactory/math.d.ts +11 -0
- package/src/vaultFactory/math.d.ts.map +1 -0
- package/src/vaultFactory/math.js +10 -9
- package/src/vaultFactory/orderedVaultStore.d.ts +93 -0
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
- package/src/vaultFactory/orderedVaultStore.js +8 -11
- package/src/vaultFactory/params.d.ts +140 -0
- package/src/vaultFactory/params.d.ts.map +1 -0
- package/src/vaultFactory/params.js +52 -24
- package/src/vaultFactory/prioritizedVaults.d.ts +279 -0
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
- package/src/vaultFactory/prioritizedVaults.js +4 -4
- package/src/vaultFactory/proceeds.d.ts +35 -0
- package/src/vaultFactory/proceeds.d.ts.map +1 -0
- package/src/vaultFactory/proceeds.js +26 -18
- package/src/vaultFactory/storeUtils.d.ts +25 -0
- package/src/vaultFactory/storeUtils.d.ts.map +1 -0
- package/src/vaultFactory/storeUtils.js +10 -12
- package/src/vaultFactory/types-ambient.d.ts +137 -0
- package/src/vaultFactory/types-ambient.d.ts.map +1 -0
- package/src/vaultFactory/{types.js → types-ambient.js} +42 -42
- package/src/vaultFactory/vault.d.ts +332 -0
- package/src/vaultFactory/vault.d.ts.map +1 -0
- package/src/vaultFactory/vault.js +99 -93
- package/src/vaultFactory/vaultDirector.d.ts +340 -0
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
- package/src/vaultFactory/vaultDirector.js +63 -50
- package/src/vaultFactory/vaultFactory.d.ts +201 -0
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
- package/src/vaultFactory/vaultFactory.js +49 -32
- package/src/vaultFactory/vaultHolder.d.ts +126 -0
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
- package/src/vaultFactory/vaultHolder.js +10 -14
- package/src/vaultFactory/vaultKit.d.ts +32 -0
- package/src/vaultFactory/vaultKit.d.ts.map +1 -0
- package/src/vaultFactory/vaultKit.js +5 -4
- package/src/vaultFactory/vaultManager.d.ts +674 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -0
- package/src/vaultFactory/vaultManager.js +249 -151
- package/CHANGELOG.md +0 -1033
- package/bundles/bundle-auctioneer-js-meta.json +0 -722
- package/bundles/bundle-auctioneer.js +0 -1
- package/bundles/bundle-econCommitteeCharter-js-meta.json +0 -514
- package/bundles/bundle-econCommitteeCharter.js +0 -1
- package/bundles/bundle-feeDistributor-js-meta.json +0 -458
- package/bundles/bundle-feeDistributor.js +0 -1
- package/bundles/bundle-fluxAggregatorKit-js-meta.json +0 -674
- package/bundles/bundle-fluxAggregatorKit.js +0 -1
- package/bundles/bundle-psm-js-meta.json +0 -666
- package/bundles/bundle-psm.js +0 -1
- package/bundles/bundle-reserve-js-meta.json +0 -662
- package/bundles/bundle-reserve.js +0 -1
- package/bundles/bundle-scaledPriceAuthority-js-meta.json +0 -542
- package/bundles/bundle-scaledPriceAuthority.js +0 -1
- package/bundles/bundle-vaultFactory-js-meta.json +0 -790
- package/bundles/bundle-vaultFactory.js +0 -1
- package/exported.js +0 -2
- package/scripts/add-collateral-core.js +0 -112
- package/scripts/deploy-contracts.js +0 -100
- package/scripts/init-core.js +0 -198
- package/scripts/invite-committee-core.js +0 -42
- package/scripts/manual-price-feed.js +0 -117
- package/scripts/price-feed-core.js +0 -104
- package/scripts/start-local-chain.sh +0 -84
- package/src/psm/types.js +0 -3
- package/src/typeGuards.js +0 -13
- package/src/vaultFactory/type-imports.js +0 -4
|
@@ -13,12 +13,13 @@ const { Fail } = assert;
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @file we use a floating point representation of the price or rate as the
|
|
16
|
-
*
|
|
17
|
-
* the bid, but it doesn't matter for sorting. When we retrieve multiple
|
|
18
|
-
* it's only by bid value, so we don't care how the sequence numbers
|
|
16
|
+
* first part of the key in the store. The second part is the sequence number
|
|
17
|
+
* of the bid, but it doesn't matter for sorting. When we retrieve multiple
|
|
18
|
+
* bids, it's only by bid value, so we don't care how the sequence numbers
|
|
19
|
+
* sort.
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* We take advantage of the fact that encodeData takes a passable and turns it
|
|
22
|
+
* into a sort key. Arrays of passable data sort like composite keys.
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -39,7 +40,7 @@ export const toPartialOfferKey = offerPrice => {
|
|
|
39
40
|
* @param {Ratio} offerPrice IST/collateral
|
|
40
41
|
* @param {bigint} sequenceNumber
|
|
41
42
|
* @returns {string} lexically sortable string in which highest price is first,
|
|
42
|
-
*
|
|
43
|
+
* ties will be broken by sequenceNumber of offer
|
|
43
44
|
*/
|
|
44
45
|
export const toPriceOfferKey = (offerPrice, sequenceNumber) => {
|
|
45
46
|
mustMatch(offerPrice, RatioShape);
|
|
@@ -87,6 +88,7 @@ const bidScalingRatioFromKey = (bidScaleFloat, numBrand, useDecimals) => {
|
|
|
87
88
|
* @returns {[normalizedPrice: Ratio, sequenceNumber: bigint]}
|
|
88
89
|
*/
|
|
89
90
|
export const fromPriceOfferKey = (key, numBrand, denomBrand, useDecimals) => {
|
|
91
|
+
// @ts-expect-error XXX
|
|
90
92
|
const [pricePart, sequenceNumberPart] = decodeData(key);
|
|
91
93
|
return [
|
|
92
94
|
priceRatioFromFloat(pricePart, numBrand, denomBrand, useDecimals),
|
|
@@ -107,7 +109,7 @@ export const toBidScalingComparator = rate => {
|
|
|
107
109
|
* @param {Ratio} rate discount/markup rate expressed as a ratio IST/IST
|
|
108
110
|
* @param {bigint} sequenceNumber
|
|
109
111
|
* @returns {string} lexically sortable string in which highest price is first,
|
|
110
|
-
*
|
|
112
|
+
* ties will be broken by sequenceNumber of offer
|
|
111
113
|
*/
|
|
112
114
|
export const toScaledRateOfferKey = (rate, sequenceNumber) => {
|
|
113
115
|
mustMatch(rate, RatioShape);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */
|
|
2
|
+
/**
|
|
3
|
+
* Constants for Auction State.
|
|
4
|
+
*
|
|
5
|
+
* @type {{ ACTIVE: 'active'; WAITING: 'waiting' }}
|
|
6
|
+
*/
|
|
7
|
+
export const AuctionState: {
|
|
8
|
+
ACTIVE: "active";
|
|
9
|
+
WAITING: "waiting";
|
|
10
|
+
};
|
|
11
|
+
export function makeBrandedRatioPattern(numeratorAmountShape: {
|
|
12
|
+
brand: Brand;
|
|
13
|
+
value: Pattern;
|
|
14
|
+
}, denominatorAmountShape: {
|
|
15
|
+
brand: Brand;
|
|
16
|
+
value: Pattern;
|
|
17
|
+
}): {
|
|
18
|
+
numerator: {
|
|
19
|
+
brand: Brand;
|
|
20
|
+
value: Pattern;
|
|
21
|
+
};
|
|
22
|
+
denominator: {
|
|
23
|
+
brand: Brand;
|
|
24
|
+
value: Pattern;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export function isScaledBidPriceHigher(bidScaling: Ratio, currentPrice: Ratio, oraclePrice: Ratio): boolean;
|
|
28
|
+
/** @type {(quote: PriceQuote) => Ratio} */
|
|
29
|
+
export const priceFrom: (quote: PriceQuote) => Ratio;
|
|
30
|
+
export function makeCancelTokenMaker(name: any): () => import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {}>;
|
|
31
|
+
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
32
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AASA,8HAA8H;AAE9H;;;;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,wBADW,CAAC,KAAK,EAAE,UAAU,KAAK,KAAK,CAKnC;AAEG,4KAIN;gCA/C6F,4BAA4B"}
|
package/src/auction/util.js
CHANGED
|
@@ -7,10 +7,12 @@ import {
|
|
|
7
7
|
} from '@agoric/zoe/src/contractSupport/index.js';
|
|
8
8
|
import { Far } from '@endo/marshal';
|
|
9
9
|
|
|
10
|
+
/** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* Constants for Auction State.
|
|
12
14
|
*
|
|
13
|
-
* @type {{ ACTIVE: 'active'
|
|
15
|
+
* @type {{ ACTIVE: 'active'; WAITING: 'waiting' }}
|
|
14
16
|
*/
|
|
15
17
|
export const AuctionState = {
|
|
16
18
|
ACTIVE: 'active',
|
|
@@ -18,8 +20,8 @@ export const AuctionState = {
|
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
|
-
* @param {{ brand: Brand
|
|
22
|
-
* @param {{ brand: Brand
|
|
23
|
+
* @param {{ brand: Brand; value: Pattern }} numeratorAmountShape
|
|
24
|
+
* @param {{ brand: Brand; value: Pattern }} denominatorAmountShape
|
|
23
25
|
*/
|
|
24
26
|
export const makeBrandedRatioPattern = (
|
|
25
27
|
numeratorAmountShape,
|
|
@@ -36,7 +38,7 @@ export const makeBrandedRatioPattern = (
|
|
|
36
38
|
* @param {Ratio} currentPrice
|
|
37
39
|
* @param {Ratio} oraclePrice
|
|
38
40
|
* @returns {boolean} TRUE iff the discount(/markup) applied to the price is
|
|
39
|
-
*
|
|
41
|
+
* higher than the quote.
|
|
40
42
|
*/
|
|
41
43
|
export const isScaledBidPriceHigher = (bidScaling, currentPrice, oraclePrice) =>
|
|
42
44
|
ratioGTE(multiplyRatios(oraclePrice, bidScaling), currentPrice);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
export function lookupOfferIdForVault(vaultId: string, currentP: Promise<import("@agoric/smart-wallet/src/smartWallet.js").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;
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientSupport.d.ts","sourceRoot":"","sources":["clientSupport.js"],"names":[],"mappings":"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"}
|