@agoric/inter-protocol 0.17.0 → 0.17.1-upgrade-23-dev-bd79330.0.bd79330
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 +23 -27
- package/source-spec-registry.js +67 -0
- package/src/auction/util.d.ts +3 -1
- package/src/auction/util.d.ts.map +1 -1
- package/src/auction/util.js +1 -2
- package/src/clientSupport.d.ts +29 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +25 -129
- package/src/collectFees.d.ts +4 -0
- package/src/collectFees.d.ts.map +1 -1
- package/src/collectFees.js +5 -2
- package/src/contractSupport.d.ts +10 -2
- package/src/contractSupport.d.ts.map +1 -1
- package/src/contractSupport.js +8 -3
- package/src/econCommitteeCharter.d.ts +19 -8
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +12 -12
- package/src/feeDistributor.d.ts +56 -52
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +5 -3
- package/src/index.js +0 -3
- package/src/interest-math.d.ts +1 -0
- package/src/interest-math.d.ts.map +1 -1
- package/src/interest-math.js +1 -2
- package/src/interest.d.ts +13 -1
- package/src/interest.d.ts.map +1 -1
- package/src/interest.js +6 -3
- package/src/price/fluxAggregatorContract.d.ts +38 -14
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +26 -12
- package/src/price/fluxAggregatorKit.d.ts +18 -8
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +22 -8
- package/src/price/priceOracleKit.d.ts +3 -1
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +3 -1
- package/src/price/roundsManager.d.ts +15 -8
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +9 -2
- package/src/proposals/addAssetToVault.js +17 -105
- package/src/proposals/committee-proposal.js +14 -14
- package/src/proposals/core-proposal.js +12 -37
- package/src/proposals/deploy-price-feeds.js +12 -5
- package/src/proposals/econ-behaviors.js +23 -154
- package/src/proposals/price-feed-proposal.js +14 -4
- package/src/proposals/replace-fee-distributor.js +8 -4
- package/src/proposals/replace-scaledPriceAuthorities.js +8 -2
- package/src/proposals/replaceElectorate.js +7 -1
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +15 -6
- package/src/proposals/upgrade-scaledPriceAuthorities.js +5 -0
- package/src/proposals/utils.d.ts +10 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +16 -8
- package/src/proposals/withdraw-reserve-proposal.js +6 -1
- package/src/provisionPool.d.ts +36 -18
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +19 -12
- package/src/provisionPoolKit.d.ts +29 -77
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +33 -23
- package/src/psm/psm.d.ts +36 -24
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +19 -15
- package/src/reserve/assetReserve.d.ts +16 -6
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +17 -9
- package/src/reserve/assetReserveKit.d.ts +13 -10
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +7 -5
- package/src/reserve/params.d.ts +1 -1
- package/src/reserve/params.d.ts.map +1 -1
- package/src/reserve/params.js +1 -3
- package/src/vaultFactory/burn.d.ts +4 -1
- package/src/vaultFactory/burn.d.ts.map +1 -1
- package/src/vaultFactory/burn.js +5 -4
- package/src/vaultFactory/math.d.ts +2 -0
- package/src/vaultFactory/math.d.ts.map +1 -1
- package/src/vaultFactory/math.js +5 -3
- package/src/vaultFactory/orderedVaultStore.d.ts +36 -36
- package/src/vaultFactory/params.d.ts +37 -10
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +34 -13
- package/src/vaultFactory/prioritizedVaults.d.ts +98 -95
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -1
- package/src/vaultFactory/prioritizedVaults.js +3 -2
- package/src/vaultFactory/storeUtils.d.ts +8 -3
- package/src/vaultFactory/storeUtils.d.ts.map +1 -1
- package/src/vaultFactory/storeUtils.js +8 -4
- package/src/vaultFactory/{types-ambient.d.ts → types.d.ts} +40 -40
- package/src/vaultFactory/types.d.ts.map +1 -0
- package/src/vaultFactory/{types-ambient.js → types.js} +26 -25
- package/src/vaultFactory/vault.d.ts +51 -35
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +29 -17
- package/src/vaultFactory/vaultDirector.d.ts +102 -112
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +40 -82
- package/src/vaultFactory/vaultFactory.d.ts +47 -95
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +27 -27
- package/src/vaultFactory/vaultHolder.d.ts +62 -55
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +10 -4
- package/src/vaultFactory/vaultKit.d.ts +15 -10
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +8 -7
- package/src/vaultFactory/vaultManager.d.ts +112 -262
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +42 -319
- package/NEWS.md +0 -0
- package/scripts/build-bundles.js +0 -22
- package/src/auction/auctionBook.d.ts +0 -147
- package/src/auction/auctionBook.d.ts.map +0 -1
- package/src/auction/auctionBook.js +0 -794
- package/src/auction/auctionMath.d.ts +0 -17
- package/src/auction/auctionMath.d.ts.map +0 -1
- package/src/auction/auctionMath.js +0 -81
- package/src/auction/auctioneer.d.ts +0 -70
- package/src/auction/auctioneer.d.ts.map +0 -1
- package/src/auction/auctioneer.js +0 -733
- package/src/auction/offerBook.d.ts +0 -46
- package/src/auction/offerBook.d.ts.map +0 -1
- package/src/auction/offerBook.js +0 -226
- package/src/auction/params.d.ts +0 -145
- package/src/auction/params.d.ts.map +0 -1
- package/src/auction/params.js +0 -176
- package/src/auction/scheduleMath.d.ts +0 -5
- package/src/auction/scheduleMath.d.ts.map +0 -1
- package/src/auction/scheduleMath.js +0 -169
- package/src/auction/scheduler.d.ts +0 -50
- package/src/auction/scheduler.d.ts.map +0 -1
- package/src/auction/scheduler.js +0 -376
- package/src/auction/sortedOffers.d.ts +0 -8
- package/src/auction/sortedOffers.d.ts.map +0 -1
- package/src/auction/sortedOffers.js +0 -137
- package/src/proposals/add-auction.js +0 -285
- package/src/proposals/upgrade-vaults.js +0 -207
- package/src/psm/types-ambient.d.ts +0 -2
- package/src/psm/types-ambient.d.ts.map +0 -1
- package/src/psm/types-ambient.js +0 -3
- package/src/vaultFactory/liquidation.d.ts +0 -25
- package/src/vaultFactory/liquidation.d.ts.map +0 -1
- package/src/vaultFactory/liquidation.js +0 -309
- package/src/vaultFactory/proceeds.d.ts +0 -35
- package/src/vaultFactory/proceeds.d.ts.map +0 -1
- package/src/vaultFactory/proceeds.js +0 -282
- package/src/vaultFactory/types-ambient.d.ts.map +0 -1
package/src/collectFees.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export function makeCollectFeesInvitation(zcf: ZCF, feeSeat: ZCFSeat, feeBrand: Brand, keyword: string): Promise<Invitation<string>>;
|
|
2
|
+
import type { ZCF } from '@agoric/zoe';
|
|
3
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
4
|
+
import type { Brand } from '@agoric/ertp';
|
|
5
|
+
import type { Invitation } from '@agoric/zoe';
|
|
2
6
|
//# sourceMappingURL=collectFees.d.ts.map
|
package/src/collectFees.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectFees.d.ts","sourceRoot":"","sources":["collectFees.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collectFees.d.ts","sourceRoot":"","sources":["collectFees.js"],"names":[],"mappings":"AAgBO,+CANI,GAAG,WACH,OAAO,YACP,KAAK,WACL,MAAM,GACJ,OAAO,CAAC,WAAW,MAAM,CAAC,CAAC,CAYvC;yBAvB0C,aAAa;6BAAb,aAAa;2BAChC,cAAc;gCADK,aAAa"}
|
package/src/collectFees.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { atomicTransfer } from '@agoric/zoe/src/contractSupport/index.js';
|
|
4
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @import {Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
5
|
+
* @import {Brand} from '@agoric/ertp';
|
|
6
|
+
*/
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* Provide shared support for providing access to fees from a service contract.
|
|
7
10
|
*
|
package/src/contractSupport.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ export function assertOnlyKeys(proposal: ProposalRecord, keys: string[]): void;
|
|
|
12
12
|
export function allEmpty(amounts: Amount[]): boolean;
|
|
13
13
|
export function checkDebtLimit(debtLimit: Amount<"nat">, totalDebt: Amount<"nat">, toMint: Amount<"nat">): void;
|
|
14
14
|
export function makeNatAmountShape(brand: Brand, min?: NatValue): {
|
|
15
|
-
brand:
|
|
15
|
+
brand: Brand;
|
|
16
16
|
value: import("@endo/patterns").Matcher;
|
|
17
17
|
};
|
|
18
|
-
export function quoteAsRatio(quoteAmount: Pick<PriceDescription, "amountIn" | "amountOut">): import("@agoric/ertp/src/ratio").Ratio;
|
|
18
|
+
export function quoteAsRatio(quoteAmount: Pick<PriceDescription, "amountIn" | "amountOut">): import("@agoric/ertp/src/ratio.js").Ratio;
|
|
19
19
|
export type MetricsPublisherKit<T> = {
|
|
20
20
|
metricsPublication: IterationObserver<T>;
|
|
21
21
|
metricsSubscription: StoredSubscription<T>;
|
|
@@ -24,5 +24,13 @@ export type MetricsPublishKit<T> = {
|
|
|
24
24
|
metricsPublisher: Publisher<T>;
|
|
25
25
|
metricsSubscriber: StoredSubscriber<T>;
|
|
26
26
|
};
|
|
27
|
+
import type { Amount } from '@agoric/ertp';
|
|
28
|
+
import type { ProposalRecord } from '@agoric/zoe';
|
|
29
|
+
import type { Brand } from '@agoric/ertp';
|
|
30
|
+
import type { NatValue } from '@agoric/ertp';
|
|
27
31
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
32
|
+
import type { IterationObserver } from '@agoric/notifier';
|
|
33
|
+
import type { StoredSubscription } from '@agoric/notifier';
|
|
34
|
+
import type { Publisher } from '@agoric/notifier';
|
|
35
|
+
import type { StoredSubscriber } from '@agoric/notifier';
|
|
28
36
|
//# sourceMappingURL=contractSupport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractSupport.d.ts","sourceRoot":"","sources":["contractSupport.js"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"contractSupport.d.ts","sourceRoot":"","sources":["contractSupport.js"],"names":[],"mappings":";;;;;;;;AAiCO,4BANe,CAAC,SAAV,MAAQ,QACV,CAAC,QACD,CAAC,QACD,CAAC,GACC,CAAC,CAGyC;AAQhD,gCALe,CAAC,SAAV,MAAQ,QACV,CAAC,SACD,CAAC,GACC,CAAC,CAK2C;AAQlD,yCAHI,cAAc,QACd,MAAM,EAAE,QAQlB;AAMM,kCAHI,MAAM,EAAE,GACN,OAAO,CAInB;AAUM,0CAPI,OAAO,KAAK,CAAC,aACb,OAAO,KAAK,CAAC,UACb,OAAO,KAAK,CAAC,QAcvB;AAoBM,0CAHI,KAAK,QACL,QAAQ;;;EAGmC;AAG/C,0CADK,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,WAAW,CAAC,6CAEO;gCAtBtD,CAAC;wBAEA,kBAAkB,CAAC,CAAC;yBACpB,mBAAmB,CAAC,CAAC;;8BAItB,CAAC;sBAEA,UAAU,CAAC,CAAC;uBACZ,iBAAiB,CAAC,CAAC;;4BA5FR,cAAc;oCAKgB,aAAa;2BAJ5C,cAAc;8BACX,cAAc;sCAHoD,4BAA4B;uCAKnC,kBAAkB;wCAAlB,kBAAkB;+BAAlB,kBAAkB;sCAAlB,kBAAkB"}
|
package/src/contractSupport.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { Fail, q } from '@endo/errors';
|
|
4
2
|
import { AmountMath } from '@agoric/ertp';
|
|
5
3
|
import { M } from '@agoric/store';
|
|
6
4
|
import { makeRatioFromAmounts } from '@agoric/zoe/src/contractSupport/index.js';
|
|
7
5
|
|
|
8
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
8
|
+
* @import {Amount} from '@agoric/ertp';
|
|
9
|
+
* @import {Brand} from '@agoric/ertp';
|
|
10
|
+
* @import {NatValue} from '@agoric/ertp';
|
|
11
|
+
*/
|
|
12
|
+
/** @import {IterationObserver, Publisher, StoredSubscriber, StoredSubscription} from '@agoric/notifier'; */
|
|
13
|
+
/** @import {AmountKeywordRecord, ProposalRecord} from '@agoric/zoe'; */
|
|
9
14
|
|
|
10
15
|
export const amountPattern = harden({ brand: M.remotable(), value: M.any() });
|
|
11
16
|
export const ratioPattern = harden({
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
3
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
4
|
+
* @import {TimestampValue} from '@agoric/time';
|
|
5
|
+
* @import {ContractMeta, Installation, Instance, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
6
|
+
* @import {GovernorCreatorFacet} from '@agoric/governance/src/types.js';
|
|
3
7
|
*/
|
|
4
8
|
/**
|
|
5
9
|
* @file This contract makes it possible for those who govern contracts to call
|
|
@@ -12,26 +16,26 @@ export const INVITATION_MAKERS_DESC: "charter member invitation";
|
|
|
12
16
|
export const meta: ContractMeta<typeof start>;
|
|
13
17
|
export function start(zcf: ZCF<{
|
|
14
18
|
binaryVoteCounterInstallation: Installation;
|
|
15
|
-
}>,
|
|
19
|
+
}>, _privateArgs: undefined, baggage: Baggage): Promise<{
|
|
16
20
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
17
21
|
/**
|
|
18
|
-
* @param {Instance} governedInstance
|
|
22
|
+
* @param {Instance<unknown>} governedInstance
|
|
19
23
|
* @param {GovernorCreatorFacet<any>} governorFacet
|
|
20
24
|
* @param {string} [label] for diagnostic use only
|
|
21
25
|
*/
|
|
22
|
-
addInstance: (governedInstance: Instance
|
|
23
|
-
makeCharterMemberInvitation: () => Promise<
|
|
26
|
+
addInstance: (governedInstance: Instance<unknown>, governorFacet: GovernorCreatorFacet<any>, label?: string) => void;
|
|
27
|
+
makeCharterMemberInvitation: () => Promise<import("@agoric/zoe").Invitation<{
|
|
24
28
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
25
|
-
VoteOnParamChange: () => Promise<
|
|
26
|
-
VoteOnPauseOffers: (instance: any, strings: any, deadline: any) => Promise<
|
|
27
|
-
VoteOnApiCall: (instance: Instance
|
|
29
|
+
VoteOnParamChange: () => Promise<import("@agoric/zoe").Invitation<import("@agoric/governance/src/types.js").ContractGovernanceVoteResult, ParamChangesOfferArgs>>;
|
|
30
|
+
VoteOnPauseOffers: (instance: any, strings: any, deadline: any) => Promise<import("@agoric/zoe").Invitation<import("@agoric/governance/src/types.js").ContractGovernanceVoteResult, undefined>>;
|
|
31
|
+
VoteOnApiCall: (instance: Instance<unknown>, methodName: string, methodArgs: string[], deadline: TimestampValue) => Promise<import("@agoric/zoe").Invitation<import("@agoric/governance/src/types.js").ContractGovernanceVoteResult, undefined>>;
|
|
28
32
|
}>;
|
|
29
33
|
}, undefined>>;
|
|
30
34
|
}>;
|
|
31
35
|
}>;
|
|
32
36
|
export type ParamChangesOfferArgs = {
|
|
33
37
|
deadline: bigint;
|
|
34
|
-
instance: Instance
|
|
38
|
+
instance: Instance<unknown>;
|
|
35
39
|
params: Record<string, unknown>;
|
|
36
40
|
/**
|
|
37
41
|
* paramPath is determined by contract
|
|
@@ -40,4 +44,11 @@ export type ParamChangesOfferArgs = {
|
|
|
40
44
|
paramPath: unknown;
|
|
41
45
|
} | undefined;
|
|
42
46
|
};
|
|
47
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
48
|
+
import type { Installation } from '@agoric/zoe';
|
|
49
|
+
import type { ZCF } from '@agoric/zoe';
|
|
50
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
51
|
+
import type { Instance } from '@agoric/zoe';
|
|
52
|
+
import type { GovernorCreatorFacet } from '@agoric/governance/src/types.js';
|
|
53
|
+
import type { TimestampValue } from '@agoric/time';
|
|
43
54
|
//# sourceMappingURL=econCommitteeCharter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AAEH;;;;;GAKG;AAEH,qCAAsC,2BAA2B,CAAC;AAoBlE,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAMnC;AAQK,2BAJI,IAAI;IAAE,6BAA6B,EAAE,YAAY,CAAA;CAAE,CAAC,gBACpD,SAAS,WACT,OAAO;;QAsHZ;;;;WAIG;wCAHQ,SAAS,OAAO,CAAC,iBACjB,qBAAqB,GAAG,CAAC,UACzB,MAAM;;;;;0CAzEV,SAAS,OAAO,CAAC,cACjB,MAAM,cACN,MAAM,EAAE,YACR,cAAc;;;;GAkF1B;;cAjKa,MAAM;cACN,SAAS,OAAO,CAAC;YACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;mBACV,OAAO;;;kCAlBmC,aAAa;kCAAb,aAAa;yBAAb,aAAa;6BAFxD,kBAAkB;8BAEyB,aAAa;0CAC3C,iCAAiC;oCAFvC,cAAc"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
/// <reference types="@agoric/governance/exported" />
|
|
3
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
4
|
-
|
|
5
1
|
import { M, mustMatch } from '@agoric/store';
|
|
6
2
|
import { TimestampShape } from '@agoric/time';
|
|
7
3
|
import { prepareExo, provideDurableMapStore } from '@agoric/vat-data';
|
|
@@ -13,6 +9,10 @@ import { E } from '@endo/far';
|
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
12
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
13
|
+
* @import {TimestampValue} from '@agoric/time';
|
|
14
|
+
* @import {ContractMeta, Installation, Instance, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
15
|
+
* @import {GovernorCreatorFacet} from '@agoric/governance/src/types.js';
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -27,7 +27,7 @@ export const INVITATION_MAKERS_DESC = 'charter member invitation';
|
|
|
27
27
|
/**
|
|
28
28
|
* @typedef {object} ParamChangesOfferArgs
|
|
29
29
|
* @property {bigint} deadline
|
|
30
|
-
* @property {Instance} instance
|
|
30
|
+
* @property {Instance<unknown>} instance
|
|
31
31
|
* @property {Record<string, unknown>} params
|
|
32
32
|
* @property {{ paramPath: unknown }} [path] paramPath is determined by contract
|
|
33
33
|
*/
|
|
@@ -53,12 +53,12 @@ harden(meta);
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @param {ZCF<{ binaryVoteCounterInstallation: Installation }>} zcf
|
|
56
|
-
* @param {undefined}
|
|
57
|
-
* @param {
|
|
56
|
+
* @param {undefined} _privateArgs
|
|
57
|
+
* @param {Baggage} baggage
|
|
58
58
|
*/
|
|
59
|
-
export const start = async (zcf,
|
|
59
|
+
export const start = async (zcf, _privateArgs, baggage) => {
|
|
60
60
|
const { binaryVoteCounterInstallation: counter } = zcf.getTerms();
|
|
61
|
-
/** @type {MapStore<Instance
|
|
61
|
+
/** @type {MapStore<Instance<unknown>, GovernorCreatorFacet<any>>} */
|
|
62
62
|
const instanceToGovernor = provideDurableMapStore(
|
|
63
63
|
baggage,
|
|
64
64
|
'instanceToGovernor',
|
|
@@ -102,10 +102,10 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
* @param {Instance} instance
|
|
105
|
+
* @param {Instance<unknown>} instance
|
|
106
106
|
* @param {string} methodName
|
|
107
107
|
* @param {string[]} methodArgs
|
|
108
|
-
* @param {
|
|
108
|
+
* @param {TimestampValue} deadline
|
|
109
109
|
*/
|
|
110
110
|
const makeApiInvocationInvitation = (
|
|
111
111
|
instance,
|
|
@@ -173,7 +173,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
173
173
|
CharterCreatorI,
|
|
174
174
|
{
|
|
175
175
|
/**
|
|
176
|
-
* @param {Instance} governedInstance
|
|
176
|
+
* @param {Instance<unknown>} governedInstance
|
|
177
177
|
* @param {GovernorCreatorFacet<any>} governorFacet
|
|
178
178
|
* @param {string} [label] for diagnostic use only
|
|
179
179
|
*/
|
package/src/feeDistributor.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** @type {ContractMeta<typeof start>} */
|
|
2
2
|
export const meta: ContractMeta<typeof start>;
|
|
3
3
|
export function makeContractFeeCollector(zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>): {
|
|
4
|
-
collectFees: () => Promise<
|
|
5
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
6
|
-
collectFees: () => Promise<
|
|
4
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
5
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
6
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
7
7
|
}>;
|
|
8
8
|
export function startDistributing(schedulePayments: () => Promise<unknown>, timerService: ERef<TimerService>, collectionInterval?: RelativeTime): void;
|
|
9
9
|
export function makeShareConfig(destinations?: Record<Keyword, ERef<FeeDestination>>, keywordShares?: Record<Keyword, NatValue>): {
|
|
10
10
|
shares: {
|
|
11
11
|
share: bigint;
|
|
12
|
-
destination:
|
|
12
|
+
destination: ERef<FeeDestination>;
|
|
13
13
|
}[];
|
|
14
14
|
totalShares: bigint;
|
|
15
15
|
};
|
|
@@ -21,9 +21,9 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
21
21
|
}): {
|
|
22
22
|
creatorFacet: {
|
|
23
23
|
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
24
|
-
collectFees: () => Promise<
|
|
25
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
26
|
-
collectFees: () => Promise<
|
|
24
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
25
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
26
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
27
27
|
}>;
|
|
28
28
|
/**
|
|
29
29
|
* Start distributing fees from this collector.
|
|
@@ -33,14 +33,12 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
33
33
|
*/
|
|
34
34
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
35
35
|
/**
|
|
36
|
-
* @param {
|
|
37
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
38
|
-
* >} depositFacet
|
|
36
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
39
37
|
*/
|
|
40
|
-
makeDepositFacetDestination: (depositFacet:
|
|
41
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
42
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
43
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
38
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
39
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
40
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
41
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
44
42
|
}>;
|
|
45
43
|
/**
|
|
46
44
|
* Create a destination that generates invitations and makes Zoe offers.
|
|
@@ -53,18 +51,18 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
53
51
|
*/
|
|
54
52
|
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[]) => {
|
|
55
53
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
56
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
54
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
57
55
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
58
56
|
}>;
|
|
59
57
|
/** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
|
|
60
58
|
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
61
59
|
/** @param {Record<Keyword, bigint>} newShares */
|
|
62
60
|
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
63
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
61
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
64
62
|
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
65
|
-
collectFees: () => Promise<
|
|
66
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
67
|
-
collectFees: () => Promise<
|
|
63
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
64
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
65
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
68
66
|
}>;
|
|
69
67
|
/**
|
|
70
68
|
* Start distributing fees from this collector.
|
|
@@ -74,14 +72,12 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
74
72
|
*/
|
|
75
73
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
76
74
|
/**
|
|
77
|
-
* @param {
|
|
78
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
79
|
-
* >} depositFacet
|
|
75
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
80
76
|
*/
|
|
81
|
-
makeDepositFacetDestination: (depositFacet:
|
|
82
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
83
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
84
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
77
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
78
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
79
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
80
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
85
81
|
}>;
|
|
86
82
|
/**
|
|
87
83
|
* Create a destination that generates invitations and makes Zoe offers.
|
|
@@ -94,7 +90,7 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
94
90
|
*/
|
|
95
91
|
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[]) => {
|
|
96
92
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
97
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
93
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
98
94
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
99
95
|
}>;
|
|
100
96
|
/** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
|
|
@@ -105,7 +101,7 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
105
101
|
publicFacet: {
|
|
106
102
|
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
107
103
|
getKeywordShares: () => Record<string, bigint>;
|
|
108
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
104
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
109
105
|
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
110
106
|
getKeywordShares: () => Record<string, bigint>;
|
|
111
107
|
}>;
|
|
@@ -113,9 +109,9 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
113
109
|
export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promise<{
|
|
114
110
|
creatorFacet: {
|
|
115
111
|
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
116
|
-
collectFees: () => Promise<
|
|
117
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
118
|
-
collectFees: () => Promise<
|
|
112
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
113
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
114
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
119
115
|
}>;
|
|
120
116
|
/**
|
|
121
117
|
* Start distributing fees from this collector.
|
|
@@ -125,14 +121,12 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
125
121
|
*/
|
|
126
122
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
127
123
|
/**
|
|
128
|
-
* @param {
|
|
129
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
130
|
-
* >} depositFacet
|
|
124
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
131
125
|
*/
|
|
132
|
-
makeDepositFacetDestination: (depositFacet:
|
|
133
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
134
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
135
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
126
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
127
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
128
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
129
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
136
130
|
}>;
|
|
137
131
|
/**
|
|
138
132
|
* Create a destination that generates invitations and makes Zoe offers.
|
|
@@ -145,18 +139,18 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
145
139
|
*/
|
|
146
140
|
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[]) => {
|
|
147
141
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
148
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
142
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
149
143
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
150
144
|
}>;
|
|
151
145
|
/** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
|
|
152
146
|
setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
|
|
153
147
|
/** @param {Record<Keyword, bigint>} newShares */
|
|
154
148
|
setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
|
|
155
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
149
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
156
150
|
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
|
|
157
|
-
collectFees: () => Promise<
|
|
158
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
159
|
-
collectFees: () => Promise<
|
|
151
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
152
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
153
|
+
collectFees: () => Promise<Payment<any, any>>;
|
|
160
154
|
}>;
|
|
161
155
|
/**
|
|
162
156
|
* Start distributing fees from this collector.
|
|
@@ -166,14 +160,12 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
166
160
|
*/
|
|
167
161
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
168
162
|
/**
|
|
169
|
-
* @param {
|
|
170
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
171
|
-
* >} depositFacet
|
|
163
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
172
164
|
*/
|
|
173
|
-
makeDepositFacetDestination: (depositFacet:
|
|
174
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
175
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
176
|
-
pushPayment: (payment: any, _issuer: any) => Promise<
|
|
165
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
166
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
167
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
168
|
+
pushPayment: (payment: any, _issuer: any) => Promise<import("@agoric/ertp").NatAmount | import("@agoric/ertp").CopySetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").SetAmount<import("@endo/patterns").Key> | import("@agoric/ertp").CopyBagAmount<import("@endo/patterns").Key>>;
|
|
177
169
|
}>;
|
|
178
170
|
/**
|
|
179
171
|
* Create a destination that generates invitations and makes Zoe offers.
|
|
@@ -186,7 +178,7 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
186
178
|
*/
|
|
187
179
|
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[]) => {
|
|
188
180
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
189
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
181
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
190
182
|
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
191
183
|
}>;
|
|
192
184
|
/** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
|
|
@@ -197,7 +189,7 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
197
189
|
publicFacet: {
|
|
198
190
|
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
199
191
|
getKeywordShares: () => Record<string, bigint>;
|
|
200
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
192
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
201
193
|
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
202
194
|
getKeywordShares: () => Record<string, bigint>;
|
|
203
195
|
}>;
|
|
@@ -219,6 +211,18 @@ export type FeeDestination = {
|
|
|
219
211
|
export type ShareConfig = ReturnType<typeof makeShareConfig>;
|
|
220
212
|
export type FeeDistributorCreatorFacet = ReturnType<typeof makeFeeDistributor>["creatorFacet"];
|
|
221
213
|
export type FeeDistributorPublicFacet = ReturnType<typeof makeFeeDistributor>["publicFacet"];
|
|
214
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
215
|
+
import type { ZoeService } from '@agoric/zoe';
|
|
216
|
+
import type { ERef } from '@agoric/vow';
|
|
217
|
+
import type { Payment } from '@agoric/ertp/src/types.js';
|
|
222
218
|
import type { TimerService } from '@agoric/time';
|
|
223
219
|
import type { RelativeTime } from '@agoric/time';
|
|
220
|
+
import type { Keyword } from '@agoric/zoe';
|
|
221
|
+
import type { NatValue } from '@agoric/ertp/src/types.js';
|
|
222
|
+
import type { Issuer } from '@agoric/ertp/src/types.js';
|
|
223
|
+
import type { DepositFacet } from '@agoric/ertp/src/types.js';
|
|
224
|
+
import type { EOnly } from '@endo/far';
|
|
225
|
+
import type { ZCF } from '@agoric/zoe';
|
|
226
|
+
import type { Invitation } from '@agoric/zoe';
|
|
227
|
+
import type { Amount } from '@agoric/ertp/src/types.js';
|
|
224
228
|
//# sourceMappingURL=feeDistributor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"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"}
|
package/src/feeDistributor.js
CHANGED
|
@@ -9,6 +9,10 @@ import { KeywordShape } from '@agoric/zoe/src/typeGuards.js';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
12
|
+
* @import {EOnly} from '@endo/far';
|
|
13
|
+
* @import {Amount, DepositFacet, Issuer, NatValue, Payment} from '@agoric/ertp/src/types.js';
|
|
14
|
+
* @import {ContractMeta, Invitation, Keyword, ZCF, ZoeService} from '@agoric/zoe';
|
|
15
|
+
* @import {ERef} from '@agoric/vow';
|
|
12
16
|
*/
|
|
13
17
|
|
|
14
18
|
const KeywordSharesShape = M.recordOf(KeywordShape, M.nat());
|
|
@@ -272,9 +276,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
|
|
|
272
276
|
},
|
|
273
277
|
|
|
274
278
|
/**
|
|
275
|
-
* @param {
|
|
276
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
277
|
-
* >} depositFacet
|
|
279
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
278
280
|
*/
|
|
279
281
|
makeDepositFacetDestination: depositFacet => {
|
|
280
282
|
return Far(`DepositFacetDestination`, {
|
package/src/index.js
CHANGED
package/src/interest-math.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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
3
|
import type { Amount } from '@agoric/ertp';
|
|
4
|
+
import type { Ratio } from '@agoric/ertp/src/ratio.js';
|
|
4
5
|
//# 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":"AAmCO,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;4BAlDwC,cAAc;2BAC/B,2BAA2B"}
|
package/src/interest-math.js
CHANGED
package/src/interest.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
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
|
+
* @import {AdminFacet, InvitationAmount, Keyword, ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
5
|
+
* @import {AssetKind, Ratio} from '@agoric/ertp';
|
|
6
|
+
* @import {Calculate, CalculatorKit} from './vaultFactory/types.js';
|
|
7
|
+
* @import {MintAndTransfer} from './vaultFactory/types.js';
|
|
8
|
+
* @import {NatValue} from '@agoric/ertp';
|
|
9
|
+
* @import {Amount} from '@agoric/ertp';
|
|
5
10
|
*/
|
|
6
11
|
export const SECONDS_PER_YEAR: bigint;
|
|
7
12
|
export function makeInterestCalculator(annualRate: Ratio, chargingPeriod: RelativeTime, recordingPeriod: RelativeTime): CalculatorKit;
|
|
@@ -24,7 +29,14 @@ export function chargeInterest(powers: {
|
|
|
24
29
|
latestInterestUpdate: Timestamp;
|
|
25
30
|
totalDebt: Amount<"nat">;
|
|
26
31
|
};
|
|
32
|
+
import type { Ratio } from '@agoric/ertp';
|
|
27
33
|
import type { RelativeTime } from '@agoric/time';
|
|
34
|
+
import type { CalculatorKit } from './vaultFactory/types.js';
|
|
35
|
+
import type { NatValue } from '@agoric/ertp';
|
|
28
36
|
import type { ZCFMint } from '@agoric/zoe';
|
|
37
|
+
import type { MintAndTransfer } from './vaultFactory/types.js';
|
|
38
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
39
|
+
import type { Keyword } from '@agoric/zoe';
|
|
29
40
|
import type { Timestamp } from '@agoric/time';
|
|
41
|
+
import type { Amount } from '@agoric/ertp';
|
|
30
42
|
//# 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":"AAMA;;;;;;;;;GASG;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,OAAO,KAAK,CAAC,CAAC;CAC1B,gBACO,SAAS,GACP;IACR,kBAAkB,EAAE,KAAK,CAAC;IAC1B,oBAAoB,EAAE,SAAS,CAAC;IAChC,SAAS,EAAE,OAAO,KAAK,CAAC,CAAC;CAC1B,CA8DH;2BA3NkC,cAAc;kCAFlB,cAAc;mCAGF,yBAAyB;8BAEzC,cAAc;6BAJiC,aAAa;qCAGrD,yBAAyB;6BAHe,aAAa;6BAAb,aAAa;+BAF3D,cAAc;4BAOjB,cAAc"}
|
package/src/interest.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { Fail } from '@endo/errors';
|
|
4
2
|
import { AmountMath } from '@agoric/ertp';
|
|
5
3
|
import { natSafeMath } from '@agoric/zoe/src/contractSupport/index.js';
|
|
@@ -9,7 +7,12 @@ import { TimeMath } from '@agoric/time';
|
|
|
9
7
|
/**
|
|
10
8
|
* @import {Timestamp} from '@agoric/time'
|
|
11
9
|
* @import {RelativeTime} from '@agoric/time'
|
|
12
|
-
* @import {AdminFacet, InvitationAmount, ZCFMint} from '@agoric/zoe';
|
|
10
|
+
* @import {AdminFacet, InvitationAmount, Keyword, ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
11
|
+
* @import {AssetKind, Ratio} from '@agoric/ertp';
|
|
12
|
+
* @import {Calculate, CalculatorKit} from './vaultFactory/types.js';
|
|
13
|
+
* @import {MintAndTransfer} from './vaultFactory/types.js';
|
|
14
|
+
* @import {NatValue} from '@agoric/ertp';
|
|
15
|
+
* @import {Amount} from '@agoric/ertp';
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
export const SECONDS_PER_YEAR = 60n * 60n * 24n * 365n;
|