@agoric/inter-protocol 0.18.0-u23.0 → 0.18.0-u23.1
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 +13 -13
- package/src/auction/util.d.ts +33 -0
- package/src/auction/util.d.ts.map +1 -0
- package/src/clientSupport.d.ts +124 -0
- package/src/clientSupport.d.ts.map +1 -0
- package/src/collectFees.d.ts +6 -0
- package/src/collectFees.d.ts.map +1 -0
- package/src/contractSupport.d.ts +36 -0
- package/src/contractSupport.d.ts.map +1 -0
- package/src/econCommitteeCharter.d.ts +54 -0
- package/src/econCommitteeCharter.d.ts.map +1 -0
- package/src/feeDistributor.d.ts +228 -0
- package/src/feeDistributor.d.ts.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/interest-math.d.ts +5 -0
- package/src/interest-math.d.ts.map +1 -0
- package/src/interest.d.ts +42 -0
- package/src/interest.d.ts.map +1 -0
- package/src/price/fluxAggregatorContract.d.ts +95 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -0
- package/src/price/fluxAggregatorKit.d.ts +114 -0
- package/src/price/fluxAggregatorKit.d.ts.map +1 -0
- package/src/price/priceOracleKit.d.ts +41 -0
- package/src/price/priceOracleKit.d.ts.map +1 -0
- package/src/price/roundsManager.d.ts +211 -0
- package/src/price/roundsManager.d.ts.map +1 -0
- package/src/proposals/utils.d.ts +27 -0
- package/src/proposals/utils.d.ts.map +1 -0
- package/src/provisionPool.d.ts +87 -0
- package/src/provisionPool.d.ts.map +1 -0
- package/src/provisionPoolKit.d.ts +81 -0
- package/src/provisionPoolKit.d.ts.map +1 -0
- package/src/psm/psm.d.ts +145 -0
- package/src/psm/psm.d.ts.map +1 -0
- package/src/reserve/assetReserve.d.ts +68 -0
- package/src/reserve/assetReserve.d.ts.map +1 -0
- package/src/reserve/assetReserveKit.d.ts +106 -0
- package/src/reserve/assetReserveKit.d.ts.map +1 -0
- package/src/reserve/params.d.ts +16 -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/vaultFactory/burn.d.ts +5 -0
- package/src/vaultFactory/burn.d.ts.map +1 -0
- package/src/vaultFactory/math.d.ts +13 -0
- package/src/vaultFactory/math.d.ts.map +1 -0
- package/src/vaultFactory/orderedVaultStore.d.ts +94 -0
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
- package/src/vaultFactory/params.d.ts +170 -0
- package/src/vaultFactory/params.d.ts.map +1 -0
- package/src/vaultFactory/prioritizedVaults.d.ts +283 -0
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
- package/src/vaultFactory/storeUtils.d.ts +30 -0
- package/src/vaultFactory/storeUtils.d.ts.map +1 -0
- package/src/vaultFactory/types.d.ts +137 -0
- package/src/vaultFactory/types.d.ts.map +1 -0
- package/src/vaultFactory/vault.d.ts +360 -0
- package/src/vaultFactory/vault.d.ts.map +1 -0
- package/src/vaultFactory/vaultDirector.d.ts +337 -0
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
- package/src/vaultFactory/vaultFactory.d.ts +202 -0
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
- package/src/vaultFactory/vaultHolder.d.ts +177 -0
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
- package/src/vaultFactory/vaultKit.d.ts +38 -0
- package/src/vaultFactory/vaultKit.d.ts.map +1 -0
- package/src/vaultFactory/vaultManager.d.ts +526 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -0
- package/src/c.log +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export function prepareBridgeProvisionTool(zone: Zone): (bankManager: ERef<import("@endo/exo").Guarded<{
|
|
2
|
+
getAssetSubscription(): import("@agoric/notifier").IterableEachTopic<AssetDescriptor>;
|
|
3
|
+
getRewardDistributorDepositFacet(denom: string, feeKit: AssetIssuerKit): ERef<import("@endo/far").EOnly<import("@agoric/ertp").DepositFacet>>;
|
|
4
|
+
getModuleAccountAddress(moduleName: string): Promise<string | null>;
|
|
5
|
+
addAsset(denom: string, issuerName: string, proposedName: string, kit: AssetIssuerKit & {
|
|
6
|
+
payment?: ERef<Payment<"nat">>;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getBankForAddress(address: string): Promise<Bank>;
|
|
9
|
+
}>>, walletFactory: ERef<import("@endo/exo").Guarded<{
|
|
10
|
+
provideSmartWallet(address: string, bank: ERef<Bank>, namesByAddressAdmin: ERef<NameAdmin>): Promise<[wallet: import("@agoric/smart-wallet/src/smartWallet.js").SmartWallet, isNew: boolean]>;
|
|
11
|
+
}>>, namesByAddressAdmin: ERef<NameAdmin>, forHandler: any) => import("@endo/exo").Guarded<{
|
|
12
|
+
/** @param {BridgeMessage} obj */
|
|
13
|
+
fromBridge(obj: BridgeMessage): Promise<void>;
|
|
14
|
+
}>;
|
|
15
|
+
export function prepareProvisionPoolKit(zone: Zone, { makeRecorderKit, params, poolBank, zcf, makeBridgeProvisionTool }: {
|
|
16
|
+
makeRecorderKit: MakeRecorderKit;
|
|
17
|
+
params: any;
|
|
18
|
+
poolBank: ERef<Bank>;
|
|
19
|
+
zcf: ZCF;
|
|
20
|
+
makeBridgeProvisionTool: ReturnType<typeof prepareBridgeProvisionTool>;
|
|
21
|
+
}): ({ poolBrand, storageNode }: {
|
|
22
|
+
poolBrand: Brand<"nat">;
|
|
23
|
+
storageNode: ERemote<StorageNode>;
|
|
24
|
+
}) => Promise<ProvisionPoolKit>;
|
|
25
|
+
export type ProvisionPoolKit = {
|
|
26
|
+
machine: {
|
|
27
|
+
addRevivableAddresses: (oldAddresses: string[]) => void;
|
|
28
|
+
getWalletReviver: () => ERef<any>;
|
|
29
|
+
setReferences: (erefs: ProvisionPoolKitReferences) => Promise<void>;
|
|
30
|
+
makeHandler: () => ERef<BridgeHandler>;
|
|
31
|
+
initPSM: (brand: Brand, instance: Instance<typeof psmStart>) => void;
|
|
32
|
+
};
|
|
33
|
+
helper: any;
|
|
34
|
+
forHandler: any;
|
|
35
|
+
public: any;
|
|
36
|
+
};
|
|
37
|
+
export type PsmInstance = Instance<typeof psmStart>;
|
|
38
|
+
export type ProvisionPoolKitReferences = {
|
|
39
|
+
bankManager: ERef<BankManager>;
|
|
40
|
+
namesByAddressAdmin: ERef<NameAdmin>;
|
|
41
|
+
walletFactory: ERef<WalletFactoryStartResult["creatorFacet"]>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Metrics naming scheme is that nouns are
|
|
45
|
+
* present values and past-participles are accumulative.
|
|
46
|
+
*/
|
|
47
|
+
export type MetricsNotification = {
|
|
48
|
+
/**
|
|
49
|
+
* count of new wallets provisioned
|
|
50
|
+
*/
|
|
51
|
+
walletsProvisioned: bigint;
|
|
52
|
+
/**
|
|
53
|
+
* running sum of Minted provided
|
|
54
|
+
* to new wallets
|
|
55
|
+
*/
|
|
56
|
+
totalMintedProvided: Amount<"nat">;
|
|
57
|
+
/**
|
|
58
|
+
* running sum of Minted ever
|
|
59
|
+
* received by the contract from PSM
|
|
60
|
+
*/
|
|
61
|
+
totalMintedConverted: Amount<"nat">;
|
|
62
|
+
};
|
|
63
|
+
import type { Zone } from '@agoric/zone';
|
|
64
|
+
import type { AssetDescriptor } from '@agoric/vats/src/vat-bank.js';
|
|
65
|
+
import type { ERef } from '@endo/far';
|
|
66
|
+
import type { Payment } from '@agoric/ertp';
|
|
67
|
+
import type { Bank } from '@agoric/vats/src/vat-bank.js';
|
|
68
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
69
|
+
import type { BridgeMessage } from '@agoric/cosmic-swingset/src/types.js';
|
|
70
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
71
|
+
import type { ZCF } from '@agoric/zoe';
|
|
72
|
+
import type { Brand } from '@agoric/ertp';
|
|
73
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
74
|
+
import type { ERemote } from '@agoric/internal';
|
|
75
|
+
import type { BridgeHandler } from '@agoric/vats';
|
|
76
|
+
import type { start as psmStart } from '@agoric/inter-protocol/src/psm/psm.js';
|
|
77
|
+
import type { Instance } from '@agoric/zoe/src/zoeService/utils.js';
|
|
78
|
+
import type { BankManager } from '@agoric/vats/src/vat-bank.js';
|
|
79
|
+
import type { WalletFactoryStartResult } from '@agoric/vats/src/core/startWalletFactory.js';
|
|
80
|
+
import type { Amount } from '@agoric/ertp';
|
|
81
|
+
//# sourceMappingURL=provisionPoolKit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisionPoolKit.d.ts","sourceRoot":"","sources":["provisionPoolKit.js"],"names":[],"mappings":"AAiGO,iDAFI,IAAI;;;;;eA2gBgY,CAAC;;;;;;IAtf1Y,iCAAiC;oBAArB,aAAa;GA6B5B;AAYI,8CATI,IAAI,uEACJ;IACN,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,KAAK,IAAI,CAAC,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT,uBAAuB,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;CACxE,gCA6bC;IAA2B,SAAS,EAA5B,MAAM,KAAK,CAAC;IACe,WAAW,EAAtC,QAAQ,WAAW,CAAC;CAC5B,KAAU,OAAO,CAAC,gBAAgB,CAAC,CAevC;+BAjjBY;IACR,OAAO,EAAE;QACP,qBAAqB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;QACxD,gBAAgB,EAAE,MAAM,KAAK,GAAG,CAAC,CAAC;QAClC,aAAa,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACpE,WAAW,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,eAAe,CAAC,KAAK,IAAI,CAAC;KACtE,CAAC;IACF,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;CACb;0BAIS,SAAS,eAAe,CAAC;;iBAKxB,KAAK,WAAW,CAAC;yBACjB,KAAK,SAAS,CAAC;mBACf,KAAK,wBAAwB,CAAC,cAAc,CAAC,CAAC;;;;;;;;;;wBAM9C,MAAM;;;;;yBACN,OAAO,KAAK,CAAC;;;;;0BAEb,OAAO,KAAK,CAAC;;0BA/CJ,cAAc;qCAKH,8BAA8B;0BAZzC,WAAW;6BAJc,cAAc;0BAK1B,8BAA8B;+BAItC,cAAc;mCAVV,sCAAsC;qCAcpC,6CAA6C;yBAVzD,aAAa;2BAHa,cAAc;iCAEhC,0CAA0C;6BADtC,kBAAkB;mCAcpB,cAAc;uCAPV,uCAAuC;8BADhD,qCAAqC;iCAF5B,8BAA8B;8CAKvB,6CAA6C;4BAVxC,cAAc"}
|
package/src/psm/psm.d.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The Parity Stability Module supports efficiently minting/burning a
|
|
3
|
+
* stable token at a specified fixed ratio to a reference stable token, which
|
|
4
|
+
* thereby acts as an anchor to provide additional stability. For flexible
|
|
5
|
+
* economic policies, the fee percentage for trading into and out of the
|
|
6
|
+
* stable token are specified separately.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @import {EReturn} from '@endo/far';
|
|
10
|
+
* @import {TypedPattern, Remote} from '@agoric/internal';
|
|
11
|
+
* @import {Baggage} from '@agoric/vat-data'
|
|
12
|
+
* @import {ContractMeta, FeeMintAccess, Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
13
|
+
* @import {Ratio} from '@agoric/ertp';
|
|
14
|
+
* @import {GovernanceTerms} from '@agoric/governance/src/types.js';
|
|
15
|
+
* @import {Amount} from '@agoric/ertp';
|
|
16
|
+
* @import {Brand} from '@agoric/ertp';
|
|
17
|
+
* @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
|
|
18
|
+
* @import {Marshaller} from '@agoric/internal/src/lib-chainStorage.js';
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {object} MetricsNotification Metrics naming scheme is that nouns are
|
|
22
|
+
* present values and past-participles are accumulative.
|
|
23
|
+
* @property {Amount<'nat'>} anchorPoolBalance amount of Anchor token available
|
|
24
|
+
* to be swapped
|
|
25
|
+
* @property {Amount<'nat'>} mintedPoolBalance amount of Minted token
|
|
26
|
+
* outstanding (the amount minted minus the amount burned).
|
|
27
|
+
* @property {Amount<'nat'>} feePoolBalance amount of Minted token fees
|
|
28
|
+
* available to be collected
|
|
29
|
+
* @property {Amount<'nat'>} totalAnchorProvided running sum of Anchor ever
|
|
30
|
+
* given by this contract
|
|
31
|
+
* @property {Amount<'nat'>} totalMintedProvided running sum of Minted ever
|
|
32
|
+
* given by this contract
|
|
33
|
+
*/
|
|
34
|
+
/** @type {ContractMeta<typeof start>} */
|
|
35
|
+
export const meta: ContractMeta<typeof start>;
|
|
36
|
+
export function start(zcf: ZCF<GovernanceTerms<{
|
|
37
|
+
GiveMintedFee: "ratio";
|
|
38
|
+
WantMintedFee: "ratio";
|
|
39
|
+
MintLimit: "amount";
|
|
40
|
+
}> & {
|
|
41
|
+
anchorBrand: Brand<"nat">;
|
|
42
|
+
anchorPerMinted: Ratio;
|
|
43
|
+
}>, privateArgs: {
|
|
44
|
+
feeMintAccess: FeeMintAccess;
|
|
45
|
+
initialPoserInvitation: Invitation;
|
|
46
|
+
storageNode: Remote<StorageNode>;
|
|
47
|
+
marshaller: Remote<Marshaller>;
|
|
48
|
+
}, baggage: Baggage): Promise<{
|
|
49
|
+
creatorFacet: import("@endo/exo").Guarded<{
|
|
50
|
+
getParamMgrRetriever: () => {
|
|
51
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
52
|
+
GiveMintedFee: "ratio";
|
|
53
|
+
MintLimit: "amount";
|
|
54
|
+
WantMintedFee: "ratio";
|
|
55
|
+
} & {
|
|
56
|
+
Electorate: "invitation";
|
|
57
|
+
}>;
|
|
58
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
59
|
+
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
60
|
+
GiveMintedFee: "ratio";
|
|
61
|
+
MintLimit: "amount";
|
|
62
|
+
WantMintedFee: "ratio";
|
|
63
|
+
} & {
|
|
64
|
+
Electorate: "invitation";
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
67
|
+
getInvitation: (name: any) => Promise<Invitation>;
|
|
68
|
+
getLimitedCreatorFacet: () => import("@endo/exo").Guarded<{
|
|
69
|
+
getRewardAllocation(): import("@agoric/zoe").Allocation;
|
|
70
|
+
makeCollectFeesInvitation(): Promise<Invitation<string>>;
|
|
71
|
+
makeRestoreMetricsInvitation(): Promise<Invitation<void, Omit<MetricsNotification, "anchorPoolBalance">>>;
|
|
72
|
+
}>;
|
|
73
|
+
getGovernedApis: () => import("@agoric/governance").GovernedApis;
|
|
74
|
+
getGovernedApiNames: () => string[];
|
|
75
|
+
setOfferFilter: (strings: any) => Promise<void>;
|
|
76
|
+
}>;
|
|
77
|
+
publicFacet: import("@endo/exo").Guarded<{
|
|
78
|
+
getAmount: (name: string) => Amount;
|
|
79
|
+
getBrand: (name: string) => Brand;
|
|
80
|
+
getInstance: (name: string) => import("@agoric/zoe").Instance;
|
|
81
|
+
getInstallation: (name: string) => import("@agoric/zoe").Installation;
|
|
82
|
+
getInvitationAmount: (name: string) => import("@agoric/zoe").InvitationAmount;
|
|
83
|
+
getNat: (name: string) => bigint;
|
|
84
|
+
getRatio: (name: string) => Ratio;
|
|
85
|
+
getString: (name: string) => string;
|
|
86
|
+
getTimestamp: (name: string) => import("@agoric/time").TimestampRecord;
|
|
87
|
+
getRelativeTime: (name: string) => import("@agoric/time").RelativeTimeRecord;
|
|
88
|
+
getUnknown: (name: string) => any;
|
|
89
|
+
getSubscription: () => import("@agoric/notifier").StoredSubscription<import("@agoric/governance").GovernanceSubscriptionState>;
|
|
90
|
+
getGovernedParams: () => import("@endo/eventual-send").ERef<import("@agoric/governance").ParamStateRecord>;
|
|
91
|
+
getMetrics(): import("@agoric/notifier").Subscriber<MetricsNotification>;
|
|
92
|
+
getPoolBalance(): import("@agoric/ertp").NatAmount;
|
|
93
|
+
getPublicTopics(): {
|
|
94
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
95
|
+
};
|
|
96
|
+
makeWantMintedInvitation(): Promise<Invitation<void, undefined>>;
|
|
97
|
+
makeGiveMintedInvitation(): Promise<Invitation<void, undefined>>;
|
|
98
|
+
}>;
|
|
99
|
+
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Metrics naming scheme is that nouns are
|
|
102
|
+
* present values and past-participles are accumulative.
|
|
103
|
+
*/
|
|
104
|
+
export type MetricsNotification = {
|
|
105
|
+
/**
|
|
106
|
+
* amount of Anchor token available
|
|
107
|
+
* to be swapped
|
|
108
|
+
*/
|
|
109
|
+
anchorPoolBalance: Amount<"nat">;
|
|
110
|
+
/**
|
|
111
|
+
* amount of Minted token
|
|
112
|
+
* outstanding (the amount minted minus the amount burned).
|
|
113
|
+
*/
|
|
114
|
+
mintedPoolBalance: Amount<"nat">;
|
|
115
|
+
/**
|
|
116
|
+
* amount of Minted token fees
|
|
117
|
+
* available to be collected
|
|
118
|
+
*/
|
|
119
|
+
feePoolBalance: Amount<"nat">;
|
|
120
|
+
/**
|
|
121
|
+
* running sum of Anchor ever
|
|
122
|
+
* given by this contract
|
|
123
|
+
*/
|
|
124
|
+
totalAnchorProvided: Amount<"nat">;
|
|
125
|
+
/**
|
|
126
|
+
* running sum of Minted ever
|
|
127
|
+
* given by this contract
|
|
128
|
+
*/
|
|
129
|
+
totalMintedProvided: Amount<"nat">;
|
|
130
|
+
};
|
|
131
|
+
export type PsmPublicFacet = EReturn<typeof start>["publicFacet"];
|
|
132
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
133
|
+
import type { GovernanceTerms } from '@agoric/governance/src/types.js';
|
|
134
|
+
import type { Brand } from '@agoric/ertp';
|
|
135
|
+
import type { Ratio } from '@agoric/ertp';
|
|
136
|
+
import type { ZCF } from '@agoric/zoe';
|
|
137
|
+
import type { FeeMintAccess } from '@agoric/zoe';
|
|
138
|
+
import type { Invitation } from '@agoric/zoe';
|
|
139
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
140
|
+
import type { Remote } from '@agoric/internal';
|
|
141
|
+
import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
|
|
142
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
143
|
+
import type { Amount } from '@agoric/ertp';
|
|
144
|
+
import type { EReturn } from '@endo/far';
|
|
145
|
+
//# sourceMappingURL=psm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psm.d.ts","sourceRoot":"","sources":["psm.js"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;GAaG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAmCnC;AAsBK,2BAlBI,IACV,gBAAoB;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,QAAQ,CAAC;CACrB,CAAC,GAAG;IACH,WAAW,EAAE,MAAM,KAAK,CAAC,CAAC;IAC1B,eAAe,EAAE,KAAK,CAAC;CACxB,CACF,eACO;IACN,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB,EAAE,UAAU,CAAC;IACnC,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;CAChC,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqUjB;;;;;;;;;;uBAxYa,OAAO,KAAK,CAAC;;;;;uBAEb,OAAO,KAAK,CAAC;;;;;oBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;6BAmYb,QAAQ,OAAO,KAAK,CAAb,CAAe,aAAa,CAAC;kCAvZsB,aAAa;qCAEnD,iCAAiC;2BAE3C,cAAc;2BAHd,cAAc;yBADkC,aAAa;mCAAb,aAAa;gCAAb,aAAa;iCAKvD,0CAA0C;4BAPjC,kBAAkB;gCAQ5B,0CAA0C;6BAP7C,kBAAkB;4BAInB,cAAc;6BANb,WAAW"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** @type {ContractMeta<typeof start>} */
|
|
2
|
+
export const meta: ContractMeta<typeof start>;
|
|
3
|
+
export function start(zcf: ZCF<GovernanceTerms<{}> & {
|
|
4
|
+
governedApis: ["burnFeesToReduceShortfall"];
|
|
5
|
+
}>, privateArgs: {
|
|
6
|
+
feeMintAccess: FeeMintAccess;
|
|
7
|
+
initialPoserInvitation: Invitation;
|
|
8
|
+
marshaller: ERemote<Marshaller>;
|
|
9
|
+
storageNode: ERemote<StorageNode>;
|
|
10
|
+
}, baggage: Baggage): Promise<{
|
|
11
|
+
/** @type {GovernedCreatorFacet<typeof assetReserveKit.machine>} */
|
|
12
|
+
creatorFacet: GovernedCreatorFacet<import("@endo/exo").Guarded<{
|
|
13
|
+
addIssuer(issuer: Issuer, keyword: string): Promise<void>;
|
|
14
|
+
getAllocations(): Allocation;
|
|
15
|
+
makeShortfallReportingInvitation(): Promise<Invitation<import("@endo/exo").Guarded<{
|
|
16
|
+
increaseLiquidationShortfall(shortfall: Amount<"nat">): void;
|
|
17
|
+
reduceLiquidationShortfall(reduction: Amount<"nat">): void;
|
|
18
|
+
}>, undefined>>;
|
|
19
|
+
makeSingleWithdrawalInvitation(): Promise<Invitation<any, undefined>>;
|
|
20
|
+
makeRepeatableWithdrawalInvitation(): Promise<Invitation<{
|
|
21
|
+
invitationMakers: Partial<any>;
|
|
22
|
+
}, undefined>>;
|
|
23
|
+
revokeOutstandingWithdrawalInvitations(): void;
|
|
24
|
+
}>>;
|
|
25
|
+
/** @type {GovernedPublicFacet<typeof assetReserveKit.public>} */
|
|
26
|
+
publicFacet: GovernedPublicFacet<import("@endo/exo").Guarded<{
|
|
27
|
+
makeAddCollateralInvitation(): Promise<Invitation<string, never>>;
|
|
28
|
+
getPublicTopics(): {
|
|
29
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("./assetReserveKit.js").MetricsNotification>;
|
|
30
|
+
};
|
|
31
|
+
}>>;
|
|
32
|
+
}>;
|
|
33
|
+
export type ShortfallReportingFacet = {
|
|
34
|
+
increaseLiquidationShortfall: (increase: Amount) => void;
|
|
35
|
+
reduceLiquidationShortfall: (reduction: Amount) => void;
|
|
36
|
+
};
|
|
37
|
+
export type ShortfallReporter = {
|
|
38
|
+
increaseLiquidationShortfall: (shortfall: Amount) => void;
|
|
39
|
+
reduceLiquidationShortfall: (shortfall: Amount) => void;
|
|
40
|
+
};
|
|
41
|
+
export type AssetReserveLimitedCreatorFacet = {
|
|
42
|
+
addIssuer: (issuer: Issuer, kwd: string) => void;
|
|
43
|
+
getAllocations: () => Allocation;
|
|
44
|
+
makeShortfallReportingInvitation: () => Promise<Invitation<ShortfallReporter>>;
|
|
45
|
+
};
|
|
46
|
+
export type AssetReservePublicFacet = EReturn<typeof start>["publicFacet"];
|
|
47
|
+
/**
|
|
48
|
+
* the creator facet for the governor
|
|
49
|
+
*/
|
|
50
|
+
export type AssetReserveCreatorFacet = EReturn<typeof start>["creatorFacet"];
|
|
51
|
+
export type ReserveContract = ContractOf<typeof start>;
|
|
52
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
53
|
+
import type { GovernanceTerms } from '@agoric/governance/src/types.js';
|
|
54
|
+
import type { ZCF } from '@agoric/zoe';
|
|
55
|
+
import type { FeeMintAccess } from '@agoric/zoe';
|
|
56
|
+
import type { Invitation } from '@agoric/zoe';
|
|
57
|
+
import type { Marshaller } from '@agoric/internal/src/lib-chainStorage.js';
|
|
58
|
+
import type { ERemote } from '@agoric/internal';
|
|
59
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
60
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
61
|
+
import type { Issuer } from '@agoric/ertp';
|
|
62
|
+
import type { Allocation } from '@agoric/zoe';
|
|
63
|
+
import type { Amount } from '@agoric/ertp';
|
|
64
|
+
import type { GovernedCreatorFacet } from '@agoric/governance/src/types.js';
|
|
65
|
+
import type { GovernedPublicFacet } from '@agoric/governance/src/types.js';
|
|
66
|
+
import type { EReturn } from '@endo/far';
|
|
67
|
+
import type { ContractOf } from '@agoric/zoe/src/zoeService/utils.js';
|
|
68
|
+
//# sourceMappingURL=assetReserve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetReserve.d.ts","sourceRoot":"","sources":["assetReserve.js"],"names":[],"mappings":"AAyBA,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AA8BK,2BAbI,IACV,gBAAoB,EAAE,CAAC,GAAG;IACpB,YAAY,EAAE,CAAC,2BAA2B,CAAC,CAAC;CAC7C,CACF,eACO;IACN,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,QAAQ,UAAU,CAAC,CAAC;IAChC,WAAW,EAAE,QAAQ,WAAW,CAAC,CAAC;CACnC,WACO,OAAO;IAuDd,mEAAmE;kBAAxD;;;;;;;;;;;;OAAoD;IAE/D,iEAAiE;iBAAtD;;;;;OAAkD;GAKhE;sCAtFY;IACR,4BAA4B,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,0BAA0B,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;;kCAwFU,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI;gCAC3B,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI;;;eAK3B,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI;oBACrC,MAAM,UAAU;sCAChB,MAAM,OAAO,CAAC,WAAW,iBAAiB,CAAC,CAAC;;sCAG5C,QAAQ,OAAO,KAAK,CAAb,CAAe,aAAa,CAAC;;;;uCAErC,QAAQ,OAAO,KAAK,CAAb,CAAe,cAAc,CAAC;8BAIpC,WAAW,OAAO,KAAK,CAAC;kCA9HqC,aAAa;qCACtD,iCAAiC;yBADQ,aAAa;mCAAb,aAAa;gCAAb,aAAa;gCAM9C,0CAA0C;6BAV1D,kBAAkB;iCAUF,0CAA0C;6BAT1D,kBAAkB;4BAQnB,cAAc;gCALoC,aAAa;4BAI/D,cAAc;0CAFA,iCAAiC;yCAClC,iCAAiC;6BAL7C,WAAW;gCACR,qCAAqC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export function prepareAssetReserveKit(baggage: Baggage, { feeMint, makeRecorderKit, storageNode, zcf }: {
|
|
2
|
+
feeMint: ZCFMint<"nat">;
|
|
3
|
+
makeRecorderKit: MakeRecorderKit;
|
|
4
|
+
storageNode: ERemote<StorageNode>;
|
|
5
|
+
zcf: ZCF;
|
|
6
|
+
}): Promise<() => Promise<import("@endo/exo").GuardedKit<{
|
|
7
|
+
helper: {
|
|
8
|
+
/** @param {Brand} brand */
|
|
9
|
+
getKeywordForBrand(brand: Brand): string;
|
|
10
|
+
/**
|
|
11
|
+
* @param {Brand} brand
|
|
12
|
+
* @param {Keyword} keyword
|
|
13
|
+
*/
|
|
14
|
+
saveBrandKeyword(brand: Brand, keyword: Keyword): void;
|
|
15
|
+
writeMetrics(): void;
|
|
16
|
+
};
|
|
17
|
+
governedApis: {
|
|
18
|
+
/**
|
|
19
|
+
* @param {Amount<'nat'>} reduction
|
|
20
|
+
* @returns {void}
|
|
21
|
+
*/
|
|
22
|
+
burnFeesToReduceShortfall(reduction: Amount<"nat">): void;
|
|
23
|
+
};
|
|
24
|
+
withdrawalHandler: {
|
|
25
|
+
handle(seat: any): Promise<string>;
|
|
26
|
+
};
|
|
27
|
+
withdrawalFacet: {
|
|
28
|
+
Withdraw(): Promise<import("@agoric/zoe").Invitation<any, undefined>>;
|
|
29
|
+
};
|
|
30
|
+
repeatableWithdrawalHandler: {
|
|
31
|
+
/**
|
|
32
|
+
* @param {ZCFSeat} seat
|
|
33
|
+
*/
|
|
34
|
+
handle(seat: ZCFSeat): {
|
|
35
|
+
invitationMakers: Partial<any>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
machine: {
|
|
39
|
+
/**
|
|
40
|
+
* @param {Issuer} issuer
|
|
41
|
+
* @param {string} keyword
|
|
42
|
+
*/
|
|
43
|
+
addIssuer(issuer: Issuer, keyword: string): Promise<void>;
|
|
44
|
+
/** XXX redundant with getPublicTopics metrics `allocation` */
|
|
45
|
+
getAllocations(): import("@agoric/zoe").Allocation;
|
|
46
|
+
makeShortfallReportingInvitation(): Promise<import("@agoric/zoe").Invitation<import("@endo/exo").Guarded<{
|
|
47
|
+
/** @param {Amount<'nat'>} shortfall */
|
|
48
|
+
increaseLiquidationShortfall(shortfall: Amount<"nat">): void;
|
|
49
|
+
/** @param {Amount<'nat'>} reduction */
|
|
50
|
+
reduceLiquidationShortfall(reduction: Amount<"nat">): void;
|
|
51
|
+
}>, undefined>>;
|
|
52
|
+
makeSingleWithdrawalInvitation(): Promise<import("@agoric/zoe").Invitation<any, undefined>>;
|
|
53
|
+
makeRepeatableWithdrawalInvitation(): Promise<import("@agoric/zoe").Invitation<{
|
|
54
|
+
invitationMakers: Partial<any>;
|
|
55
|
+
}, undefined>>;
|
|
56
|
+
revokeOutstandingWithdrawalInvitations(): void;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* XXX missing governance public methods
|
|
60
|
+
* https://github.com/Agoric/agoric-sdk/issues/5200
|
|
61
|
+
*/
|
|
62
|
+
public: {
|
|
63
|
+
/** Anyone can deposit any assets to the reserve */
|
|
64
|
+
makeAddCollateralInvitation(): Promise<import("@agoric/zoe").Invitation<string, never>>;
|
|
65
|
+
getPublicTopics(): {
|
|
66
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
shortfallReportingFacet: {
|
|
70
|
+
/** @param {Amount<'nat'>} shortfall */
|
|
71
|
+
increaseLiquidationShortfall(shortfall: Amount<"nat">): void;
|
|
72
|
+
/** @param {Amount<'nat'>} reduction */
|
|
73
|
+
reduceLiquidationShortfall(reduction: Amount<"nat">): void;
|
|
74
|
+
};
|
|
75
|
+
}>>>;
|
|
76
|
+
export type MetricsNotification = {
|
|
77
|
+
allocations: AmountKeywordRecord;
|
|
78
|
+
/**
|
|
79
|
+
* shortfall from liquidation that
|
|
80
|
+
* has not yet been compensated.
|
|
81
|
+
*/
|
|
82
|
+
shortfallBalance: Amount<"nat">;
|
|
83
|
+
/**
|
|
84
|
+
* total Fee tokens minted to date
|
|
85
|
+
*/
|
|
86
|
+
totalFeeMinted: Amount<"nat">;
|
|
87
|
+
/**
|
|
88
|
+
* total Fee tokens burned to date
|
|
89
|
+
*/
|
|
90
|
+
totalFeeBurned: Amount<"nat">;
|
|
91
|
+
};
|
|
92
|
+
export type AssetReserveKit = EReturn<EReturn<typeof prepareAssetReserveKit>>;
|
|
93
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
94
|
+
import type { ZCFMint } from '@agoric/zoe';
|
|
95
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
96
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
97
|
+
import type { ERemote } from '@agoric/internal';
|
|
98
|
+
import type { ZCF } from '@agoric/zoe';
|
|
99
|
+
import type { Brand } from '@agoric/ertp';
|
|
100
|
+
import type { Keyword } from '@agoric/zoe';
|
|
101
|
+
import type { Amount } from '@agoric/ertp';
|
|
102
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
103
|
+
import type { Issuer } from '@agoric/ertp';
|
|
104
|
+
import type { AmountKeywordRecord } from '@agoric/zoe/src/zoeService/types.js';
|
|
105
|
+
import type { EReturn } from '@endo/far';
|
|
106
|
+
//# sourceMappingURL=assetReserveKit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetReserveKit.d.ts","sourceRoot":"","sources":["assetReserveKit.js"],"names":[],"mappings":"AAmDO,gDARI,OAAO,kDACP;IACN,OAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,QAAQ,WAAW,CAAC,CAAC;IAClC,GAAG,EAAE,GAAG,CAAC;CACV;;QA8GI,2BAA2B;kCAAf,KAAK;QAUjB;;;WAGG;gCAFQ,KAAK,WACL,OAAO;;;;QAqBlB;;;WAGG;6CAFQ,OAAO,KAAK,CAAC,GACX,IAAI;;;;;;;;;QAsDjB;;WAEG;qBADQ,OAAO;;;;;QAYlB;;;WAGG;0BAFQ,MAAM,WACN,MAAM;QAmBjB,8DAA8D;;;YA2E9D,uCAAuC;oDAA3B,OAAO,KAAK,CAAC;YAWzB,uCAAuC;kDAA3B,OAAO,KAAK,CAAC;;;;;;;;IArD3B;;;OAGG;;QAED,mDAAmD;;;;;;;QAqCnD,uCAAuC;gDAA3B,OAAO,KAAK,CAAC;QAWzB,uCAAuC;8CAA3B,OAAO,KAAK,CAAC;;KA8BhC;;iBA3Wa,mBAAmB;;;;;sBACnB,OAAO,KAAK,CAAC;;;;oBAEb,OAAO,KAAK,CAAC;;;;oBACb,OAAO,KAAK,CAAC;;8BAyWb,QAAQ,QAAQ,OAAO,sBAAsB,CAAC,CAAC;6BAnXnC,kBAAkB;6BADmB,aAAa;qCAE1C,6CAA6C;iCANjD,0CAA0C;6BADxB,kBAAkB;yBAKH,aAAa;2BAHpC,cAAc;6BAGS,aAAa;4BAHpC,cAAc;6BAGS,aAAa;4BAHpC,cAAc;yCAEhB,qCAAqC;6BALjD,WAAW"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {AdminFacet, InvitationAmount, ZCFMint} from '@agoric/zoe';
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @param {InvitationAmount} poserInvitationAmount
|
|
6
|
+
*/
|
|
7
|
+
export function makeReserveTerms(poserInvitationAmount: InvitationAmount): {
|
|
8
|
+
governedParams: {
|
|
9
|
+
Electorate: {
|
|
10
|
+
type: "invitation";
|
|
11
|
+
value: import("@agoric/ertp").SetAmount<import("@agoric/zoe").InvitationDetails>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
import type { InvitationAmount } from '@agoric/zoe';
|
|
16
|
+
//# sourceMappingURL=params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["params.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;GAEG;AACH,wDAFW,gBAAgB;;;;;;;EASzB;sCAbsD,aAAa"}
|
package/src/tokens.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.js"],"names":[],"mappings":"2BAEc,KAAK,GAAG,KAAK"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function paymentFromZCFMint(zcf: ZCF, zcfMint: ZCFMint, amount: Amount): Promise<import("@agoric/ertp").Payment<any, any>>;
|
|
2
|
+
import type { ZCF } from '@agoric/zoe';
|
|
3
|
+
import type { ZCFMint } from '@agoric/zoe';
|
|
4
|
+
import type { Amount } from '@agoric/ertp';
|
|
5
|
+
//# sourceMappingURL=burn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"burn.d.ts","sourceRoot":"","sources":["burn.js"],"names":[],"mappings":"AAYO,wCAJI,GAAG,WACH,OAAO,UACP,MAAM,qDAOhB;yBAd8B,aAAa;6BAAb,aAAa;4BACnB,cAAc"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function calculateMinimumCollateralization(liquidationMargin: Ratio, liquidationPadding: Ratio): Ratio;
|
|
2
|
+
export function minimumPrice(quoteA: PriceQuote, quoteB?: PriceQuote): Ratio;
|
|
3
|
+
export function maxDebtForVault(quoteAmount: PriceQuote, liquidationMargin: Ratio, liquidationPadding: Ratio): Amount<"nat">;
|
|
4
|
+
export function calculateDebtCosts(currentDebt: Amount<"nat">, give: Amount<"nat">, want: Amount<"nat">, debtFee: Ratio): {
|
|
5
|
+
newDebt: import("@agoric/ertp").NatAmount;
|
|
6
|
+
toMint: import("@agoric/ertp").NatAmount;
|
|
7
|
+
fee: import("@agoric/ertp").NatAmount;
|
|
8
|
+
surplus: import("@agoric/ertp").NatAmount;
|
|
9
|
+
};
|
|
10
|
+
import type { Ratio } from '@agoric/ertp';
|
|
11
|
+
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
12
|
+
import type { Amount } from '@agoric/ertp';
|
|
13
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["math.js"],"names":[],"mappings":"AA8BO,qEAJI,KAAK,sBACL,KAAK,GACH,KAAK,CAKmC;AAS9C,qCAJI,UAAU,WACV,UAAU,GACR,KAAK,CAajB;AAYM,6CALI,UAAU,qBACV,KAAK,sBACL,KAAK,GACH,OAAO,KAAK,CAAC,CAczB;AAaM,gDALI,OAAO,KAAK,CAAC,QACb,OAAO,KAAK,CAAC,QACb,OAAO,KAAK,CAAC,WACb,KAAK;;;;;EASf;2BA/EuB,cAAc;gCADuD,4BAA4B;4BAEhG,cAAc"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export function makeOrderedVaultStore(store: MapStore<string, Vault>): {
|
|
2
|
+
addVault: (vaultId: string, vault: Vault) => string;
|
|
3
|
+
removeByKey: (key: string) => Vault;
|
|
4
|
+
has: (key: string) => boolean;
|
|
5
|
+
keys: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => Iterable<string>;
|
|
6
|
+
entries: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => Iterable<[string, import("@endo/exo").Guarded<{
|
|
7
|
+
getVaultSeat(): import("@agoric/zoe").ZCFSeat;
|
|
8
|
+
initVaultKit(seat: import("@agoric/zoe").ZCFSeat, storageNode: import("@agoric/internal").Remote<import("@agoric/internal/src/lib-chainStorage.js").StorageNode>): Promise<{
|
|
9
|
+
publicSubscribers: {
|
|
10
|
+
vault: {
|
|
11
|
+
description: string;
|
|
12
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
13
|
+
storagePath: Promise<string>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
17
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
18
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
19
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
20
|
+
}>;
|
|
21
|
+
vault: import("@endo/exo").Guarded<{
|
|
22
|
+
getPublicTopics(): {
|
|
23
|
+
vault: {
|
|
24
|
+
description: string;
|
|
25
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
26
|
+
storagePath: Promise<string>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
30
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
31
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
32
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
33
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
34
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
35
|
+
}>;
|
|
36
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
37
|
+
}>;
|
|
38
|
+
liquidating(): void;
|
|
39
|
+
liquidated(): void;
|
|
40
|
+
abortLiquidation(): string;
|
|
41
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
42
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
43
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation<import("./vaultKit.js").VaultKit>>;
|
|
44
|
+
getCollateralAmount(): import("@agoric/ertp").Amount<"nat">;
|
|
45
|
+
getCurrentDebt(): import("@agoric/ertp").Amount<"nat">;
|
|
46
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
47
|
+
}>]>;
|
|
48
|
+
getSize: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => number;
|
|
49
|
+
values: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => Iterable<import("@endo/exo").Guarded<{
|
|
50
|
+
getVaultSeat(): import("@agoric/zoe").ZCFSeat;
|
|
51
|
+
initVaultKit(seat: import("@agoric/zoe").ZCFSeat, storageNode: import("@agoric/internal").Remote<import("@agoric/internal/src/lib-chainStorage.js").StorageNode>): Promise<{
|
|
52
|
+
publicSubscribers: {
|
|
53
|
+
vault: {
|
|
54
|
+
description: string;
|
|
55
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
56
|
+
storagePath: Promise<string>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
60
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
61
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
62
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
63
|
+
}>;
|
|
64
|
+
vault: import("@endo/exo").Guarded<{
|
|
65
|
+
getPublicTopics(): {
|
|
66
|
+
vault: {
|
|
67
|
+
description: string;
|
|
68
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
69
|
+
storagePath: Promise<string>;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
73
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
74
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
75
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
76
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
77
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
78
|
+
}>;
|
|
79
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
80
|
+
}>;
|
|
81
|
+
liquidating(): void;
|
|
82
|
+
liquidated(): void;
|
|
83
|
+
abortLiquidation(): string;
|
|
84
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
85
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
86
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation<import("./vaultKit.js").VaultKit>>;
|
|
87
|
+
getCollateralAmount(): import("@agoric/ertp").Amount<"nat">;
|
|
88
|
+
getCurrentDebt(): import("@agoric/ertp").Amount<"nat">;
|
|
89
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
90
|
+
}>>;
|
|
91
|
+
};
|
|
92
|
+
import type { Vault } from './vault.js';
|
|
93
|
+
import type { MapStore } from '@agoric/store';
|
|
94
|
+
//# sourceMappingURL=orderedVaultStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderedVaultStore.d.ts","sourceRoot":"","sources":["orderedVaultStore.js"],"names":[],"mappings":"AAmBO,6CADK,SAAS,MAAM,EAAE,KAAK,CAAC;wBAGtB,MAAM,SACN,KAAK;uBAWL,MAAM,KACJ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCnB;2BApDuB,YAAY;8BADT,eAAe"}
|