@agoric/inter-protocol 0.16.2-other-dev-3eb1a1d.0 → 0.16.2-other-dev-d15096d.0.d15096d
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/package.json +36 -35
- package/src/auction/auctionBook.d.ts +9 -7
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +58 -32
- package/src/auction/auctionMath.d.ts +1 -1
- package/src/auction/auctionMath.d.ts.map +1 -1
- package/src/auction/auctioneer.d.ts +19 -13
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +25 -12
- package/src/auction/offerBook.d.ts +3 -2
- package/src/auction/offerBook.d.ts.map +1 -1
- package/src/auction/offerBook.js +5 -1
- package/src/auction/params.d.ts +16 -7
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +12 -4
- package/src/auction/scheduleMath.d.ts +5 -3
- package/src/auction/scheduleMath.d.ts.map +1 -1
- package/src/auction/scheduleMath.js +11 -7
- package/src/auction/scheduler.d.ts +9 -4
- package/src/auction/scheduler.d.ts.map +1 -1
- package/src/auction/scheduler.js +14 -6
- package/src/auction/util.d.ts +2 -1
- package/src/auction/util.d.ts.map +1 -1
- package/src/auction/util.js +4 -1
- package/src/clientSupport.d.ts +29 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +29 -128
- package/src/contractSupport.d.ts +2 -2
- package/src/contractSupport.d.ts.map +1 -1
- package/src/econCommitteeCharter.d.ts +15 -8
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +14 -8
- package/src/feeDistributor.d.ts +43 -49
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +7 -3
- package/src/index.js +1 -1
- package/src/interest-math.d.ts +1 -0
- package/src/interest-math.d.ts.map +1 -1
- package/src/interest-math.js +5 -1
- package/src/interest.d.ts +3 -1
- package/src/interest.d.ts.map +1 -1
- package/src/interest.js +2 -5
- package/src/price/README.md +1 -1
- package/src/price/fluxAggregatorContract.d.ts +20 -11
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +17 -9
- package/src/price/fluxAggregatorKit.d.ts +15 -9
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +15 -9
- package/src/price/priceOracleKit.d.ts +4 -2
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +7 -2
- package/src/price/roundsManager.d.ts +8 -6
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +5 -2
- package/src/proposals/add-auction.js +38 -4
- package/src/proposals/addAssetToVault.js +8 -4
- package/src/proposals/committee-proposal.js +10 -5
- package/src/proposals/core-proposal.js +9 -3
- package/src/proposals/deploy-price-feeds.js +35 -7
- package/src/proposals/econ-behaviors.js +33 -12
- package/src/proposals/price-feed-proposal.js +10 -3
- package/src/proposals/replace-fee-distributor.js +12 -6
- package/src/proposals/replaceElectorate.js +105 -16
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +7 -4
- package/src/proposals/upgrade-vaults.js +15 -5
- package/src/proposals/utils.d.ts +8 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +32 -9
- package/src/proposals/withdraw-reserve-proposal.js +63 -0
- package/src/provisionPool.d.ts +34 -120
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +43 -21
- package/src/provisionPoolKit.d.ts +43 -328
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +210 -120
- package/src/psm/psm.d.ts +20 -13
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +18 -12
- package/src/reserve/assetReserve.d.ts +18 -6
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +26 -23
- package/src/reserve/assetReserveKit.d.ts +38 -6
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +117 -7
- package/src/reserve/params.d.ts +9 -3
- package/src/reserve/params.d.ts.map +1 -1
- package/src/reserve/params.js +8 -2
- package/src/vaultFactory/burn.d.ts +1 -1
- package/src/vaultFactory/burn.d.ts.map +1 -1
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +7 -3
- package/src/vaultFactory/liquidation.d.ts.map +1 -1
- package/src/vaultFactory/liquidation.js +14 -12
- package/src/vaultFactory/math.d.ts +1 -1
- package/src/vaultFactory/math.d.ts.map +1 -1
- package/src/vaultFactory/math.js +1 -1
- package/src/vaultFactory/orderedVaultStore.d.ts +21 -20
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -1
- package/src/vaultFactory/orderedVaultStore.js +4 -2
- package/src/vaultFactory/params.d.ts +25 -9
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +29 -11
- package/src/vaultFactory/prioritizedVaults.d.ts +70 -69
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -1
- package/src/vaultFactory/prioritizedVaults.js +5 -2
- package/src/vaultFactory/storeUtils.d.ts +2 -2
- package/src/vaultFactory/storeUtils.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.d.ts +2 -2
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +6 -2
- package/src/vaultFactory/vault.d.ts +34 -30
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +19 -15
- package/src/vaultFactory/vaultDirector.d.ts +81 -63
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +38 -24
- package/src/vaultFactory/vaultFactory.d.ts +35 -22
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +27 -17
- package/src/vaultFactory/vaultHolder.d.ts +77 -29
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +12 -4
- package/src/vaultFactory/vaultKit.d.ts +12 -8
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +12 -5
- package/src/vaultFactory/vaultManager.d.ts +102 -88
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +86 -53
- package/src/proposals/add-auction.d.ts +0 -109
- package/src/proposals/add-auction.d.ts.map +0 -1
- package/src/proposals/addAssetToVault.d.ts +0 -173
- 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/deploy-price-feeds.d.ts +0 -76
- package/src/proposals/deploy-price-feeds.d.ts.map +0 -1
- package/src/proposals/econ-behaviors.d.ts +0 -541
- package/src/proposals/econ-behaviors.d.ts.map +0 -1
- package/src/proposals/price-feed-proposal.d.ts +0 -84
- package/src/proposals/price-feed-proposal.d.ts.map +0 -1
- package/src/proposals/replace-fee-distributor.d.ts +0 -48
- package/src/proposals/replace-fee-distributor.d.ts.map +0 -1
- package/src/proposals/replace-scaledPriceAuthorities.d.ts +0 -30
- package/src/proposals/replace-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/replaceElectorate.d.ts +0 -55
- package/src/proposals/replaceElectorate.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 -59
- package/src/proposals/startPSM.d.ts.map +0 -1
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +0 -24
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/upgrade-vaults.d.ts +0 -41
- package/src/proposals/upgrade-vaults.d.ts.map +0 -1
package/src/feeDistributor.js
CHANGED
|
@@ -7,6 +7,12 @@ import { mustMatch, makeScalarSetStore, M } from '@agoric/store';
|
|
|
7
7
|
import { RelativeTimeShape } from '@agoric/time';
|
|
8
8
|
import { KeywordShape } from '@agoric/zoe/src/typeGuards.js';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import {MapStore, SetStore} from '@agoric/store';
|
|
12
|
+
* @import {EOnly} from '@endo/far';
|
|
13
|
+
* @import {DepositFacet} from '@agoric/ertp/src/types.js';
|
|
14
|
+
*/
|
|
15
|
+
|
|
10
16
|
const KeywordSharesShape = M.recordOf(KeywordShape, M.nat());
|
|
11
17
|
|
|
12
18
|
/** @type {ContractMeta<typeof start>} */
|
|
@@ -268,9 +274,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
|
|
|
268
274
|
},
|
|
269
275
|
|
|
270
276
|
/**
|
|
271
|
-
* @param {
|
|
272
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
273
|
-
* >} depositFacet
|
|
277
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
274
278
|
*/
|
|
275
279
|
makeDepositFacetDestination: depositFacet => {
|
|
276
280
|
return Far(`DepositFacetDestination`, {
|
package/src/index.js
CHANGED
package/src/interest-math.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export function calculateCurrentDebt(debtSnapshot: Amount<"nat">, interestSnapshot: Ratio, currentCompoundedInterest: Ratio): Amount<"nat">;
|
|
2
2
|
export function reverseInterest(debt: Amount<"nat">, interestApplied: Ratio): Amount<"nat">;
|
|
3
|
+
import type { Amount } from '@agoric/ertp';
|
|
3
4
|
//# sourceMappingURL=interest-math.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"AAoCO,mDALI,OAAO,KAAK,CAAC,oBACb,KAAK,6BACL,KAAK,GACH,OAAO,KAAK,CAAC,CAiBzB;AAOM,sCAJI,OAAO,KAAK,CAAC,mBACb,KAAK,GACH,OAAO,KAAK,CAAC,CAIzB;4BAjDwC,cAAc"}
|
package/src/interest-math.js
CHANGED
|
@@ -6,7 +6,11 @@ import {
|
|
|
6
6
|
invertRatio,
|
|
7
7
|
multiplyRatios,
|
|
8
8
|
ratiosSame,
|
|
9
|
-
} from '@agoric/
|
|
9
|
+
} from '@agoric/ertp/src/ratio.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @import {Amount, Brand, Payment} from '@agoric/ertp';
|
|
13
|
+
*/
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* @param {Ratio} currentCompoundedInterest as coefficient
|
package/src/interest.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Timestamp} from '@agoric/time'
|
|
3
3
|
* @import {RelativeTime} from '@agoric/time'
|
|
4
|
+
* @import {AdminFacet, InvitationAmount, ZCFMint} from '@agoric/zoe';
|
|
4
5
|
*/
|
|
5
6
|
export const SECONDS_PER_YEAR: bigint;
|
|
6
7
|
export function makeInterestCalculator(annualRate: Ratio, chargingPeriod: RelativeTime, recordingPeriod: RelativeTime): CalculatorKit;
|
|
7
|
-
export function calculateCompoundedInterest(priorCompoundedInterest: Ratio, priorDebt: NatValue, newDebt: NatValue): Ratio;
|
|
8
|
+
export function calculateCompoundedInterest(priorCompoundedInterest: Ratio, priorDebt: NatValue, newDebt: NatValue): import("@agoric/ertp/src/ratio.js").Ratio;
|
|
8
9
|
export function chargeInterest(powers: {
|
|
9
10
|
mint: ZCFMint<"nat">;
|
|
10
11
|
mintAndTransferWithFee: MintAndTransfer;
|
|
@@ -24,5 +25,6 @@ export function chargeInterest(powers: {
|
|
|
24
25
|
totalDebt: Amount<"nat">;
|
|
25
26
|
};
|
|
26
27
|
import type { RelativeTime } from '@agoric/time';
|
|
28
|
+
import type { ZCFMint } from '@agoric/zoe';
|
|
27
29
|
import type { Timestamp } from '@agoric/time';
|
|
28
30
|
//# sourceMappingURL=interest.d.ts.map
|
package/src/interest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"AAQA;;;;GAIG;AAEH,sCAAuD;AAchD,mDALI,KAAK,kBACL,YAAY,mBACZ,YAAY,GACV,aAAa,CA+EzB;AASM,qEAJI,KAAK,aACL,QAAQ,WACR,QAAQ,6CAalB;AAyCM,uCAvBI;IACN,IAAI,EAAE,QAAQ,KAAK,CAAC,CAAC;IACrB,sBAAsB,EAAE,eAAe,CAAC;IACxC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAChC,UACO;IACN,YAAY,EAAE,KAAK,CAAC;IACpB,cAAc,EAAE,YAAY,CAAC;IAC7B,eAAe,EAAE,YAAY,CAAC;CAC/B,SACO;IACN,oBAAoB,EAAE,SAAS,CAAC;IAChC,kBAAkB,EAAE,KAAK,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC1B,gBACO,SAAS,GACP;IACR,kBAAkB,EAAE,KAAK,CAAC;IAC1B,oBAAoB,EAAE,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC1B,CA8DH;kCAxN8B,cAAc;6BACW,aAAa;+BAFzC,cAAc"}
|
package/src/interest.js
CHANGED
|
@@ -3,16 +3,13 @@
|
|
|
3
3
|
import { Fail } from '@endo/errors';
|
|
4
4
|
import { AmountMath } from '@agoric/ertp';
|
|
5
5
|
import { natSafeMath } from '@agoric/zoe/src/contractSupport/index.js';
|
|
6
|
-
import {
|
|
7
|
-
makeRatio,
|
|
8
|
-
multiplyRatios,
|
|
9
|
-
quantize,
|
|
10
|
-
} from '@agoric/zoe/src/contractSupport/ratio.js';
|
|
6
|
+
import { makeRatio, multiplyRatios, quantize } from '@agoric/ertp/src/ratio.js';
|
|
11
7
|
import { TimeMath } from '@agoric/time';
|
|
12
8
|
|
|
13
9
|
/**
|
|
14
10
|
* @import {Timestamp} from '@agoric/time'
|
|
15
11
|
* @import {RelativeTime} from '@agoric/time'
|
|
12
|
+
* @import {AdminFacet, InvitationAmount, ZCFMint} from '@agoric/zoe';
|
|
16
13
|
*/
|
|
17
14
|
|
|
18
15
|
export const SECONDS_PER_YEAR = 60n * 60n * 24n * 365n;
|
package/src/price/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Oracle operates can make PushPrice offers in the CLI. There is no GUI.
|
|
|
25
25
|
|
|
26
26
|
### CLI
|
|
27
27
|
|
|
28
|
-
See [oracle.js command file](/packages/agoric-cli/src/commands/oracle.js)
|
|
28
|
+
See [oracle.js command file](/packages/agoric-cli/src/commands/oracle.js)
|
|
29
29
|
|
|
30
30
|
```mermaid
|
|
31
31
|
sequenceDiagram
|
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Baggage} from '@agoric/vat-data'
|
|
3
3
|
* @import {TimerService} from '@agoric/time'
|
|
4
|
+
* @import {Remote} from '@agoric/internal';
|
|
5
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
6
|
+
* @import {PrioritySendersManager} from '@agoric/internal/src/priority-senders.js';
|
|
7
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
8
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
4
9
|
*/
|
|
5
10
|
/** @type {ContractMeta} */
|
|
6
11
|
export const meta: ContractMeta;
|
|
7
|
-
export function start(zcf: ZCF<
|
|
12
|
+
export function start(zcf: ZCF<ChainlinkConfig & {
|
|
8
13
|
timer: TimerService;
|
|
9
14
|
brandIn: Brand<"nat">;
|
|
10
15
|
brandOut: Brand<"nat">;
|
|
11
16
|
description: string;
|
|
12
17
|
unitAmountIn?: Amount<"nat">;
|
|
13
18
|
}>, privateArgs: {
|
|
14
|
-
highPrioritySendersManager?:
|
|
19
|
+
highPrioritySendersManager?: PrioritySendersManager;
|
|
15
20
|
initialPoserInvitation: Invitation;
|
|
16
|
-
marshaller:
|
|
17
|
-
namesByAddressAdmin: ERef<
|
|
18
|
-
storageNode: StorageNode
|
|
21
|
+
marshaller: Remote<Marshaller>;
|
|
22
|
+
namesByAddressAdmin: ERef<NameAdmin>;
|
|
23
|
+
storageNode: Remote<StorageNode>;
|
|
19
24
|
}, baggage: Baggage): Promise<{
|
|
20
25
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
21
26
|
getParamMgrRetriever: () => {
|
|
22
27
|
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
23
28
|
Electorate: "invitation";
|
|
24
29
|
}>;
|
|
25
|
-
} &
|
|
30
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
26
31
|
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
27
32
|
Electorate: "invitation";
|
|
28
33
|
}>;
|
|
29
34
|
}>;
|
|
30
|
-
getInvitation: (name: any) => Promise<Invitation
|
|
35
|
+
getInvitation: (name: any) => Promise<globalThis.Invitation>;
|
|
31
36
|
getLimitedCreatorFacet: () => import("@endo/exo").Guarded<{
|
|
32
|
-
makeOracleInvitation(oracleId: string): Promise<Invitation<{
|
|
37
|
+
makeOracleInvitation(oracleId: string): Promise<globalThis.Invitation<{
|
|
33
38
|
invitationMakers: {
|
|
34
|
-
PushPrice(result: import("./roundsManager.js").PriceRound): Promise<Invitation<void, undefined>>;
|
|
35
|
-
} &
|
|
36
|
-
PushPrice(result: import("./roundsManager.js").PriceRound): Promise<Invitation<void, undefined>>;
|
|
39
|
+
PushPrice(result: import("./roundsManager.js").PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
40
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
41
|
+
PushPrice(result: import("./roundsManager.js").PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
37
42
|
}>;
|
|
38
43
|
oracle: import("@endo/exo").Guarded<{
|
|
39
44
|
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: PriceDatum): Promise<void>;
|
|
@@ -66,6 +71,10 @@ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig
|
|
|
66
71
|
}>;
|
|
67
72
|
}>;
|
|
68
73
|
export type FluxStartFn = typeof start;
|
|
74
|
+
import type { ChainlinkConfig } from './fluxAggregatorKit.js';
|
|
69
75
|
import type { TimerService } from '@agoric/time';
|
|
76
|
+
import type { PrioritySendersManager } from '@agoric/internal/src/priority-senders.js';
|
|
77
|
+
import type { Remote } from '@agoric/internal';
|
|
78
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
70
79
|
import type { Baggage } from '@agoric/vat-data';
|
|
71
80
|
//# sourceMappingURL=fluxAggregatorContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAeA;;;;;;;;GAQG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK,2BAlBI,GAAG,CACb,eAAmB,GAAG;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC9B,CACF,eACO;IACN,0BAA0B,CAAC,EAAE,sBAAsB,CAAC;IACpD,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuIjB;0BAGa,OAAO,KAAK;qCA3LQ,wBAAwB;kCAF3B,cAAc;4CAGJ,0CAA0C;4BAF1D,kBAAkB;+BAGf,cAAc;6BALhB,kBAAkB"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { prepareIssuerKit } from '@agoric/ertp';
|
|
4
4
|
import { handleParamGovernance } from '@agoric/governance';
|
|
5
5
|
import { makeTracer, StorageNodeShape } from '@agoric/internal';
|
|
6
|
+
import { wrapRemoteMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
6
7
|
import { prepareDurablePublishKit } from '@agoric/notifier';
|
|
7
8
|
import { M } from '@agoric/store';
|
|
8
9
|
import { provideAll } from '@agoric/zoe/src/contractSupport/durability.js';
|
|
@@ -15,6 +16,11 @@ const trace = makeTracer('FluxAgg', false);
|
|
|
15
16
|
/**
|
|
16
17
|
* @import {Baggage} from '@agoric/vat-data'
|
|
17
18
|
* @import {TimerService} from '@agoric/time'
|
|
19
|
+
* @import {Remote} from '@agoric/internal';
|
|
20
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
21
|
+
* @import {PrioritySendersManager} from '@agoric/internal/src/priority-senders.js';
|
|
22
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
23
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
18
24
|
*/
|
|
19
25
|
|
|
20
26
|
/** @type {ContractMeta} */
|
|
@@ -45,7 +51,7 @@ harden(meta);
|
|
|
45
51
|
* feeds](https://blog.chain.link/levels-of-data-aggregation-in-chainlink-price-feeds/).
|
|
46
52
|
*
|
|
47
53
|
* @param {ZCF<
|
|
48
|
-
*
|
|
54
|
+
* ChainlinkConfig & {
|
|
49
55
|
* timer: TimerService;
|
|
50
56
|
* brandIn: Brand<'nat'>;
|
|
51
57
|
* brandOut: Brand<'nat'>;
|
|
@@ -54,11 +60,11 @@ harden(meta);
|
|
|
54
60
|
* }
|
|
55
61
|
* >} zcf
|
|
56
62
|
* @param {{
|
|
57
|
-
* highPrioritySendersManager?:
|
|
63
|
+
* highPrioritySendersManager?: PrioritySendersManager;
|
|
58
64
|
* initialPoserInvitation: Invitation;
|
|
59
|
-
* marshaller:
|
|
60
|
-
* namesByAddressAdmin: ERef<
|
|
61
|
-
* storageNode: StorageNode
|
|
65
|
+
* marshaller: Remote<Marshaller>;
|
|
66
|
+
* namesByAddressAdmin: ERef<NameAdmin>;
|
|
67
|
+
* storageNode: Remote<StorageNode>;
|
|
62
68
|
* }} privateArgs
|
|
63
69
|
* @param {Baggage} baggage
|
|
64
70
|
*/
|
|
@@ -66,7 +72,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
66
72
|
trace('prepare with baggage keys', [...baggage.keys()]);
|
|
67
73
|
|
|
68
74
|
// xxx uses contract baggage as issuerBagage, assumes one issuer in this contract
|
|
69
|
-
/** @type {
|
|
75
|
+
/** @type {QuoteKit} */
|
|
70
76
|
// @ts-expect-error cast
|
|
71
77
|
const quoteIssuerKit = prepareIssuerKit(
|
|
72
78
|
baggage,
|
|
@@ -80,7 +86,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
80
86
|
const {
|
|
81
87
|
highPrioritySendersManager,
|
|
82
88
|
initialPoserInvitation,
|
|
83
|
-
marshaller,
|
|
89
|
+
marshaller: remoteMarshaller,
|
|
84
90
|
namesByAddressAdmin,
|
|
85
91
|
storageNode,
|
|
86
92
|
} = privateArgs;
|
|
@@ -89,11 +95,13 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
89
95
|
|
|
90
96
|
trace('awaited args');
|
|
91
97
|
|
|
98
|
+
const cachingMarshaller = wrapRemoteMarshaller(remoteMarshaller);
|
|
99
|
+
|
|
92
100
|
const makeDurablePublishKit = prepareDurablePublishKit(
|
|
93
101
|
baggage,
|
|
94
102
|
'Price Aggregator publish kit',
|
|
95
103
|
);
|
|
96
|
-
const makeRecorder = prepareRecorder(baggage,
|
|
104
|
+
const makeRecorder = prepareRecorder(baggage, cachingMarshaller);
|
|
97
105
|
|
|
98
106
|
const makeFluxAggregatorKit = await prepareFluxAggregatorKit(
|
|
99
107
|
baggage,
|
|
@@ -120,7 +128,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
120
128
|
// No governed parameters. Governance just for API methods.
|
|
121
129
|
},
|
|
122
130
|
storageNode,
|
|
123
|
-
|
|
131
|
+
cachingMarshaller,
|
|
124
132
|
);
|
|
125
133
|
|
|
126
134
|
trace('got makeDurableGovernorFacet', makeDurableGovernorFacet);
|
|
@@ -4,7 +4,7 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
4
4
|
brandIn: Brand<"nat">;
|
|
5
5
|
brandOut: Brand<"nat">;
|
|
6
6
|
unitAmountIn?: Amount<"nat">;
|
|
7
|
-
}>, timerPresence: TimerService, quoteKit:
|
|
7
|
+
}>, timerPresence: TimerService, quoteKit: QuoteKit, storageNode: Remote<StorageNode>, makeDurablePublishKit: () => PublishKit<any>, makeRecorder: MakeRecorder): Promise<() => import("@endo/exo").GuardedKit<{
|
|
8
8
|
creator: {
|
|
9
9
|
/**
|
|
10
10
|
* An "oracle invitation" is an invitation to be able to submit data to
|
|
@@ -16,13 +16,13 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
16
16
|
*
|
|
17
17
|
* @param {string} oracleId unique per contract instance
|
|
18
18
|
*/
|
|
19
|
-
makeOracleInvitation(oracleId: string): Promise<Invitation<{
|
|
19
|
+
makeOracleInvitation(oracleId: string): Promise<globalThis.Invitation<{
|
|
20
20
|
invitationMakers: {
|
|
21
|
-
/** @param {
|
|
22
|
-
PushPrice(result:
|
|
23
|
-
} &
|
|
24
|
-
/** @param {
|
|
25
|
-
PushPrice(result:
|
|
21
|
+
/** @param {PriceRound} result */
|
|
22
|
+
PushPrice(result: PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
23
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
24
|
+
/** @param {PriceRound} result */
|
|
25
|
+
PushPrice(result: PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
26
26
|
}>;
|
|
27
27
|
oracle: import("@endo/exo").Guarded<{
|
|
28
28
|
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: PriceDatum): Promise<void>;
|
|
@@ -57,7 +57,7 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
57
57
|
getPriceAuthority(): PriceAuthority;
|
|
58
58
|
getPublicTopics(): {
|
|
59
59
|
quotes: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<PriceDescription>;
|
|
60
|
-
latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<
|
|
60
|
+
latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<LatestRound>;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
}>>;
|
|
@@ -94,10 +94,16 @@ export type ChainlinkConfig = {
|
|
|
94
94
|
*/
|
|
95
95
|
timeout: number;
|
|
96
96
|
};
|
|
97
|
-
export type FluxAggregatorKit =
|
|
97
|
+
export type FluxAggregatorKit = EReturn<EReturn<typeof prepareFluxAggregatorKit>>;
|
|
98
98
|
import type { Baggage } from '@agoric/vat-data';
|
|
99
99
|
import type { TimerService } from '@agoric/time';
|
|
100
|
+
import type { QuoteKit } from './roundsManager.js';
|
|
101
|
+
import type { Remote } from '@agoric/internal';
|
|
102
|
+
import type { MakeRecorder } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
103
|
+
import type { PriceRound } from './roundsManager.js';
|
|
100
104
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
101
105
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
106
|
+
import type { LatestRound } from './roundsManager.js';
|
|
102
107
|
import type { Timestamp } from '@agoric/time';
|
|
108
|
+
import type { EReturn } from '@endo/far';
|
|
103
109
|
//# sourceMappingURL=fluxAggregatorKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorKit.d.ts","sourceRoot":"","sources":["fluxAggregatorKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fluxAggregatorKit.d.ts","sourceRoot":"","sources":["fluxAggregatorKit.js"],"names":[],"mappings":"AAkCA,qCAAsC,mBAAmB,CAAC;AAgEnD,kDAfI,OAAO,OACP,GAAG,CACT,eAAe,GAAG;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC9B,CACF,iBACO,YAAY,YACZ,QAAQ,eACR,OAAO,WAAW,CAAC,yBACnB,MAAM,UAAU,CAAC,GAAG,CAAC,gBACrB,YAAY;;QA8If;;;;;;;;;WASG;uCADQ,MAAM;;gBAiBX,iCAAiC;kCAArB,UAAU;;gBAAtB,iCAAiC;kCAArB,UAAU;;;;;;;QAqB5B,+BAA+B;+BAAnB,MAAM;;QAalB,+BAA+B;6BAAnB,MAAM;;;;;;;;;QAoBlB;;;;;;;;WAQG;mCAHQ,MAAM,kBACN,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC;;;;;;;;;IAqDvC;;8BAvUa,OAAO;oBACP,MAAM;sBACN,MAAM;eACN,SAAS;kBACT,MAAM;iBACN,MAAM;;;wBAMN,MAAM;wBACN,MAAM;;;;;kBACN,MAAM;;;;;wBAEN,MAAM;;;;;wBAEN,MAAM;;;;;;aAEN,MAAM;;gCAsTN,QAAQ,QAAQ,OAAO,wBAAwB,CAAC,CAAC;6BAtVrC,kBAAkB;kCAKb,cAAc;8BAjBlB,oBAAoB;4BAHR,kBAAkB;kCAI1B,6CAA6C;gCAG/C,oBAAoB;oCAN4C,4BAA4B;sCAA5B,4BAA4B;iCAI3F,oBAAoB;+BAWtB,cAAc;6BAjBhB,WAAW"}
|
|
@@ -19,8 +19,15 @@ import { prepareOracleAdminKit } from './priceOracleKit.js';
|
|
|
19
19
|
import { prepareRoundsManagerKit } from './roundsManager.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* @import {
|
|
22
|
+
* @import {EReturn} from '@endo/far';
|
|
23
|
+
* @import {TypedPattern, Remote} from '@agoric/internal';
|
|
23
24
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
25
|
+
* @import {MapStore, SetStore} from '@agoric/store';
|
|
26
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
27
|
+
* @import {MakeRecorder} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
28
|
+
* @import {LatestRound} from './roundsManager.js';
|
|
29
|
+
* @import {OracleKit} from './priceOracleKit.js';
|
|
30
|
+
* @import {PriceRound} from './roundsManager.js';
|
|
24
31
|
*/
|
|
25
32
|
|
|
26
33
|
const trace = makeTracer('FlxAgg', true);
|
|
@@ -84,10 +91,10 @@ const priceDescriptionFromQuote = quote => quote.quoteAmount.value[0];
|
|
|
84
91
|
* }
|
|
85
92
|
* >} zcf
|
|
86
93
|
* @param {TimerService} timerPresence
|
|
87
|
-
* @param {
|
|
88
|
-
* @param {StorageNode} storageNode
|
|
94
|
+
* @param {QuoteKit} quoteKit
|
|
95
|
+
* @param {Remote<StorageNode>} storageNode
|
|
89
96
|
* @param {() => PublishKit<any>} makeDurablePublishKit
|
|
90
|
-
* @param {
|
|
97
|
+
* @param {MakeRecorder} makeRecorder
|
|
91
98
|
*/
|
|
92
99
|
export const prepareFluxAggregatorKit = async (
|
|
93
100
|
baggage,
|
|
@@ -130,7 +137,6 @@ export const prepareFluxAggregatorKit = async (
|
|
|
130
137
|
const makeOracleAdminKit = prepareOracleAdminKit(baggage);
|
|
131
138
|
|
|
132
139
|
const makeRecorderKit = defineRecorderKit({
|
|
133
|
-
// @ts-expect-error XXX
|
|
134
140
|
makeDurablePublishKit,
|
|
135
141
|
makeRecorder,
|
|
136
142
|
});
|
|
@@ -154,7 +160,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
154
160
|
makeRecorderKit(
|
|
155
161
|
node,
|
|
156
162
|
/**
|
|
157
|
-
* @type {TypedPattern<
|
|
163
|
+
* @type {TypedPattern<LatestRound>}
|
|
158
164
|
*/ (M.any()),
|
|
159
165
|
),
|
|
160
166
|
),
|
|
@@ -222,7 +228,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
222
228
|
}),
|
|
223
229
|
},
|
|
224
230
|
() => {
|
|
225
|
-
/** @type {MapStore<string,
|
|
231
|
+
/** @type {MapStore<string, OracleKit>} */
|
|
226
232
|
const oracles = makeScalarBigMapStore('oracles', {
|
|
227
233
|
durable: true,
|
|
228
234
|
});
|
|
@@ -255,7 +261,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
255
261
|
seat.exit();
|
|
256
262
|
const { oracle } = await facets.creator.initOracle(oracleId);
|
|
257
263
|
const invitationMakers = Far('invitation makers', {
|
|
258
|
-
/** @param {
|
|
264
|
+
/** @param {PriceRound} result */
|
|
259
265
|
PushPrice(result) {
|
|
260
266
|
return zcf.makeInvitation(
|
|
261
267
|
/** @param {ZCFSeat} cSeat */
|
|
@@ -371,4 +377,4 @@ export const prepareFluxAggregatorKit = async (
|
|
|
371
377
|
return makeFluxAggregatorKit;
|
|
372
378
|
};
|
|
373
379
|
harden(prepareFluxAggregatorKit);
|
|
374
|
-
/** @typedef {
|
|
380
|
+
/** @typedef {EReturn<EReturn<typeof prepareFluxAggregatorKit>>} FluxAggregatorKit */
|
|
@@ -17,7 +17,7 @@ export function prepareOracleAdminKit(baggage: any): (args_0: HeldParams) => imp
|
|
|
17
17
|
export type HeldParams = {
|
|
18
18
|
oracleId: string;
|
|
19
19
|
roundPowers: {
|
|
20
|
-
handlePush: (status: OracleStatus, result:
|
|
20
|
+
handlePush: (status: OracleStatus, result: PriceRound) => Promise<OracleStatus>;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type PriceDatum = {
|
|
@@ -34,5 +34,7 @@ export type OracleStatus = {
|
|
|
34
34
|
export type ImmutableState = Readonly<HeldParams & {}>;
|
|
35
35
|
export type MutableState = OracleStatus & {};
|
|
36
36
|
export type State = ImmutableState & MutableState;
|
|
37
|
-
export type OracleKit =
|
|
37
|
+
export type OracleKit = EReturn<EReturn<typeof prepareOracleAdminKit>>;
|
|
38
|
+
import type { PriceRound } from './roundsManager.js';
|
|
39
|
+
import type { EReturn } from '@endo/far';
|
|
38
40
|
//# sourceMappingURL=priceOracleKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceOracleKit.d.ts","sourceRoot":"","sources":["priceOracleKit.js"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"priceOracleKit.d.ts","sourceRoot":"","sources":["priceOracleKit.js"],"names":[],"mappings":"AAMA,qCAAsC,mBAAmB,CAAC;AAiEnD;;;;;QAcC;;;;WAIG;iEADQ,UAAU;QA0BrB,8BAA8B;qBAAhB,YAAY;;GAa/B;yBAjHU;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE;QACX,UAAU,EAAE,CACV,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,UAAU,KACf,OAAO,CAAC,YAAY,CAAC,CAAC;KAC5B,CAAC;CACH;yBAGU;IAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAE;;;uBAKpD,MAAM;sBACN,MAAM;sBACN,MAAM;cACN,MAAM;;6BAGP,QAAQ,CAAC,UAAU,GAAG,EAAE,CAAC;2BAEzB,YAAY,GAAG,EAAE;oBAEhB,cAAc,GAAG,YAAY;wBAyF7B,QAAQ,QAAQ,OAAO,qBAAqB,CAAC,CAAC;gCAvH/B,oBAAoB;6BADvB,WAAW"}
|
|
@@ -6,13 +6,18 @@ const trace = makeTracer('OrKit', true);
|
|
|
6
6
|
|
|
7
7
|
export const INVITATION_MAKERS_DESC = 'oracle invitation';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @import {EReturn} from '@endo/far';
|
|
11
|
+
* @import {PriceRound} from './roundsManager.js';
|
|
12
|
+
*/
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* @typedef {{
|
|
11
16
|
* oracleId: string;
|
|
12
17
|
* roundPowers: {
|
|
13
18
|
* handlePush: (
|
|
14
19
|
* status: OracleStatus,
|
|
15
|
-
* result:
|
|
20
|
+
* result: PriceRound,
|
|
16
21
|
* ) => Promise<OracleStatus>;
|
|
17
22
|
* };
|
|
18
23
|
* }} HeldParams
|
|
@@ -122,4 +127,4 @@ export const prepareOracleAdminKit = baggage =>
|
|
|
122
127
|
},
|
|
123
128
|
);
|
|
124
129
|
|
|
125
|
-
/** @typedef {
|
|
130
|
+
/** @typedef {EReturn<EReturn<typeof prepareOracleAdminKit>>} OracleKit */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @type {bigint} */
|
|
2
2
|
export const ROUND_MAX: bigint;
|
|
3
|
-
export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<
|
|
3
|
+
export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<ChainlinkConfig & {
|
|
4
4
|
quoteKit: QuoteKit;
|
|
5
5
|
answerPublisher: Publisher<void>;
|
|
6
6
|
brandIn: Brand<"nat">;
|
|
7
7
|
brandOut: Brand<"nat">;
|
|
8
|
-
latestRoundPublisher:
|
|
8
|
+
latestRoundPublisher: Recorder<LatestRound>;
|
|
9
9
|
timerPresence: TimerService;
|
|
10
10
|
}> & {
|
|
11
11
|
unitAmountIn: Amount<"nat">;
|
|
@@ -92,7 +92,7 @@ export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<import(
|
|
|
92
92
|
}): ((priceQuery: any) => Promise<{
|
|
93
93
|
quoteAmount: import("@agoric/ertp").SetAmount<PriceDescription>;
|
|
94
94
|
quotePayment: globalThis.Payment<"set", PriceDescription>;
|
|
95
|
-
}> | undefined) &
|
|
95
|
+
}> | undefined) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (priceQuery: any) => Promise<{
|
|
96
96
|
quoteAmount: import("@agoric/ertp").SetAmount<PriceDescription>;
|
|
97
97
|
quotePayment: globalThis.Payment<"set", PriceDescription>;
|
|
98
98
|
}> | undefined>;
|
|
@@ -110,7 +110,6 @@ export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<import(
|
|
|
110
110
|
* @returns {Promise<RoundData>}
|
|
111
111
|
*/
|
|
112
112
|
getRoundData(roundIdRaw: bigint | number): Promise<RoundData>;
|
|
113
|
-
/** @type {(roundId: bigint) => Readonly<RoundDetails & Round>} */
|
|
114
113
|
getRoundStatus(roundId: bigint): Readonly<RoundDetails & Round>;
|
|
115
114
|
/**
|
|
116
115
|
* a method to provide all current info oracleStatuses need. Intended
|
|
@@ -178,12 +177,12 @@ export type RoundDetails = {
|
|
|
178
177
|
roundTimeout: number;
|
|
179
178
|
};
|
|
180
179
|
export type QuoteKit = IssuerKit<"set", PriceDescription>;
|
|
181
|
-
export type HeldParams = Readonly<
|
|
180
|
+
export type HeldParams = Readonly<ChainlinkConfig & {
|
|
182
181
|
quoteKit: QuoteKit;
|
|
183
182
|
answerPublisher: Publisher<void>;
|
|
184
183
|
brandIn: Brand<"nat">;
|
|
185
184
|
brandOut: Brand<"nat">;
|
|
186
|
-
latestRoundPublisher:
|
|
185
|
+
latestRoundPublisher: Recorder<LatestRound>;
|
|
187
186
|
timerPresence: TimerService;
|
|
188
187
|
}>;
|
|
189
188
|
export type ImmutableState = Readonly<HeldParams & {
|
|
@@ -196,9 +195,12 @@ export type MutableState = {
|
|
|
196
195
|
reportingRoundId: bigint;
|
|
197
196
|
};
|
|
198
197
|
export type State = ImmutableState & MutableState;
|
|
198
|
+
import type { ChainlinkConfig } from './fluxAggregatorKit.js';
|
|
199
|
+
import type { Recorder } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
199
200
|
import type { TimerService } from '@agoric/time';
|
|
200
201
|
import type { OracleStatus } from './priceOracleKit.js';
|
|
201
202
|
import type { Timestamp } from '@agoric/time';
|
|
202
203
|
import type { PriceQuoteValue } from '@agoric/zoe/tools/types.js';
|
|
203
204
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
205
|
+
import type { MapStore } from '@agoric/store';
|
|
204
206
|
//# sourceMappingURL=roundsManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roundsManager.d.ts","sourceRoot":"","sources":["roundsManager.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"roundsManager.d.ts","sourceRoot":"","sources":["roundsManager.js"],"names":[],"mappings":"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"}
|
|
@@ -17,7 +17,10 @@ const { add, subtract, multiply, floorDivide, ceilDivide, isGTE } = natSafeMath;
|
|
|
17
17
|
/**
|
|
18
18
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
19
19
|
* @import {Timestamp, TimerService} from '@agoric/time'
|
|
20
|
+
* @import {MapStore, SetStore} from '@agoric/store';
|
|
20
21
|
* @import {OracleStatus} from './priceOracleKit.js'
|
|
22
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
23
|
+
* @import {Recorder} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
21
24
|
*/
|
|
22
25
|
|
|
23
26
|
/** @type {string} */
|
|
@@ -66,12 +69,12 @@ const validRoundId = roundId => {
|
|
|
66
69
|
|
|
67
70
|
/**
|
|
68
71
|
* @typedef {Readonly<
|
|
69
|
-
*
|
|
72
|
+
* ChainlinkConfig & {
|
|
70
73
|
* quoteKit: QuoteKit;
|
|
71
74
|
* answerPublisher: Publisher<void>;
|
|
72
75
|
* brandIn: Brand<'nat'>;
|
|
73
76
|
* brandOut: Brand<'nat'>;
|
|
74
|
-
* latestRoundPublisher:
|
|
77
|
+
* latestRoundPublisher: Recorder<LatestRound>;
|
|
75
78
|
* timerPresence: TimerService;
|
|
76
79
|
* }
|
|
77
80
|
* >} HeldParams
|