@agoric/zoe 0.26.3-dev-d6fae11.0.d6fae11 → 0.26.3-dev-64cee5a.0.64cee5a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/bundle-contractFacet-js-meta.json +238 -238
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +14 -14
- package/src/contractFacet/vatRoot.d.ts +4 -2
- package/src/contractFacet/vatRoot.d.ts.map +1 -1
- package/src/contractFacet/vatRoot.js +2 -1
- package/src/contractFacet/zcfMint.d.ts +2 -1
- package/src/contractFacet/zcfMint.d.ts.map +1 -1
- package/src/contractFacet/zcfMint.js +2 -1
- package/src/contractSupport/durability.d.ts +3 -2
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +3 -2
- package/src/contractSupport/prepare-ownable.d.ts +2 -1
- package/src/contractSupport/prepare-ownable.d.ts.map +1 -1
- package/src/contractSupport/prepare-ownable.js +5 -1
- package/src/contractSupport/priceAuthority.d.ts +2 -1
- package/src/contractSupport/priceAuthority.d.ts.map +1 -1
- package/src/contractSupport/priceAuthority.js +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -1
- package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityQuoteMint.js +2 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts +3 -1
- package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
- package/src/contractSupport/priceAuthorityTransform.js +4 -2
- package/src/contractSupport/priceQuote.d.ts +3 -2
- package/src/contractSupport/priceQuote.d.ts.map +1 -1
- package/src/contractSupport/priceQuote.js +2 -1
- package/src/contractSupport/recorder.d.ts +4 -3
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/recorder.js +4 -3
- package/src/contractSupport/topics.d.ts +3 -1
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/topics.js +3 -1
- package/src/contracts/auction/index.d.ts +10 -6
- package/src/contracts/auction/index.d.ts.map +1 -1
- package/src/contracts/auction/index.js +5 -1
- package/src/contracts/coveredCall-durable.d.ts +3 -2
- package/src/contracts/coveredCall-durable.d.ts.map +1 -1
- package/src/contracts/coveredCall-durable.js +5 -1
- package/src/contracts/loan/types-ambient.d.ts.map +1 -1
- package/src/contracts/loan/types-ambient.js +1 -0
- package/src/contracts/loan/updateDebt.d.ts +3 -0
- package/src/contracts/loan/updateDebt.d.ts.map +1 -1
- package/src/contracts/loan/updateDebt.js +5 -1
- package/src/contracts/mintAndSellNFT.d.ts +3 -0
- package/src/contracts/mintAndSellNFT.d.ts.map +1 -1
- package/src/contracts/mintAndSellNFT.js +5 -1
- package/src/contracts/otcDesk.d.ts +6 -2
- package/src/contracts/otcDesk.d.ts.map +1 -1
- package/src/contracts/otcDesk.js +5 -1
- package/src/contracts/priceAggregator.d.ts +11 -10
- package/src/contracts/priceAggregator.d.ts.map +1 -1
- package/src/contracts/priceAggregator.js +17 -13
- package/src/contracts/priceAggregatorTypes.d.ts +2 -1
- package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
- package/src/contracts/priceAggregatorTypes.js +5 -1
- package/src/contracts/scaledPriceAuthority.d.ts +2 -1
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +2 -1
- package/src/contracts/types-ambient.d.ts.map +1 -1
- package/src/contracts/types-ambient.js +1 -0
- package/src/issuerStorage.d.ts +2 -1
- package/src/issuerStorage.d.ts.map +1 -1
- package/src/issuerStorage.js +2 -1
- package/src/typeGuards.d.ts +8 -4
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +5 -3
- package/src/zoeService/escrowStorage.d.ts +2 -1
- package/src/zoeService/escrowStorage.d.ts.map +1 -1
- package/src/zoeService/escrowStorage.js +2 -1
- package/src/zoeService/instanceAdminStorage.d.ts +3 -2
- package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
- package/src/zoeService/instanceAdminStorage.js +5 -4
- package/src/zoeService/internal-types.d.ts +12 -8
- package/src/zoeService/internal-types.d.ts.map +1 -1
- package/src/zoeService/internal-types.js +12 -8
- package/src/zoeService/invitationQueries.d.ts +6 -3
- package/src/zoeService/invitationQueries.d.ts.map +1 -1
- package/src/zoeService/invitationQueries.js +9 -3
- package/src/zoeService/originalZoeSeat.d.ts +2 -1
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +5 -1
- package/src/zoeService/startInstance.d.ts +2 -1
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +8 -5
- package/src/zoeService/zoeSeat.d.ts +2 -1
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +5 -1
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/tools/fakePriceAuthority.d.ts +6 -4
- package/tools/fakePriceAuthority.d.ts.map +1 -1
- package/tools/fakePriceAuthority.js +9 -6
- package/tools/manualPriceAuthority.d.ts +4 -2
- package/tools/manualPriceAuthority.d.ts.map +1 -1
- package/tools/manualPriceAuthority.js +2 -1
- package/tools/manualTimer.d.ts +4 -2
- package/tools/manualTimer.d.ts.map +1 -1
- package/tools/manualTimer.js +4 -2
- package/tools/scriptedOracle.d.ts +7 -3
- package/tools/scriptedOracle.d.ts.map +1 -1
- package/tools/scriptedOracle.js +4 -2
- package/tools/scriptedPriceAuthority.d.ts +1 -0
- package/tools/scriptedPriceAuthority.d.ts.map +1 -1
- package/tools/scriptedPriceAuthority.js +2 -1
- package/tools/types.d.ts +9 -5
- package/tools/types.d.ts.map +1 -1
- package/tools/types.js +9 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;sBAEa,QAAQ,CAAC,OAAO,cAAc,EAAE,eAAe,CAAC;;;;;;;wBAUhD,QAAQ;;;;;;SAUP,KAAK;sBAGL,gBAAgB;;;;;oBAEhB,OAAO,yBAAyB,EAAE,cAAc;oBAKhD,cAAc;;;;;kBAEd,KAAK;oBAIL,OAAO,cAAc,EAAE,YAAY;eAEnC,KAAK;qBACL,KAAK;;;;;;gBAKL,OAAO,sBAAsB,EAAE,OAAO;;;;;4BAMvC,SAAS,GAAG,kBAAkB;;;;;;oBAQ7B,OAAO,sBAAsB,EAAE,OAAO;;;;aAKtC,MAAM,MAAM,CAAC,KAAK,CAAC;;;;;2BAInB,aAAa,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;;;;oBAS3D,OAAO,sBAAsB,EAAE,OAAO;;;;;2BAKtC,aAAa,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;;8BAO5D,oBAAoB,GAAG,wBAAwB;uCAM/C,oBAAoB,GAAG,iCAAiC;iCAM1D,OAAO,sBAAsB,EAAE,GAAG,UAClC,sBAAsB;gCAKtB,OAAO,sBAAsB,EAAE,GAAG,UAClC,SAAS,KACP,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;kCAKpD,OAAO,sBAAsB,EAAE,GAAG,UAClC,oBAAoB,KAClB,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;qCAKpD,OAAO,sBAAsB,EAAE,GAAG,UAClC,sBAAsB,KACpB,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;;;;;yCAQpD,OAAO,sBAAsB,EAAE,GAAG,UAClC,sBAAsB,KACpB,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;iDAKpD,oBAAoB;gCAKpB,MAAM,CAAC,KAAK,CAAC,gBACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC;;;;;;oBAKZ,cAAc;;;;kBAKd,MAAM,CAAC,KAAK,CAAC;;;;oBAIb,cAAc;kBAId,KAAK;;;;oBACL,OAAO,cAAc,EAAE,YAAY;SAInC,OAAO,sBAAsB,EAAE,GAAG;wBAElC,+BAA+B;;;;;cAC/B,OAAO,cAAc,EAAE,SAAS;;;oBAMhC,OAAO,sBAAsB,EAAE,OAAO;2BACtC,aAAa,CAAC,GAAG,CAAC;;sBAElB,MAAM,CAAC,UAAU,CAAC;oBAClB,OAAO,yBAAyB,EAAE,cAAc;oBAChD,cAAc;kBACd,MAAM;oBACN,OAAO,cAAc,EAAE,YAAY;gBACnC,OAAO,sBAAsB,EAAE,OAAO;;;;;;;6BAMtC,MAAM,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;;;;iCAKxD,MAAM,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC;;;;;;;2BAIxD,MAAM,OAAO,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;iCAO3D,MAAM,OAAO,cAAc,EAAE,SAAS;;;;;qBAItC,MAAM,QAAQ,CAAC,MAAM,CAAC;;;;+BAKtB,MAAM,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateDebt.d.ts","sourceRoot":"","sources":["updateDebt.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updateDebt.d.ts","sourceRoot":"","sources":["updateDebt.js"],"names":[],"mappings":"AASA;;GAEG;AAKH;;;;;;GAMG;AACH,gCANU,cAAc,CAOgB;AAExC,iCAAiC;AACjC,iCADW,kBAAkB,CAyE3B"}
|
|
@@ -7,6 +7,10 @@ import { TimeMath } from '@agoric/time';
|
|
|
7
7
|
import { scheduleLiquidation } from './scheduleLiquidation.js';
|
|
8
8
|
import { ceilMultiplyBy } from '../../contractSupport/index.js';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import {TimestampRecord} from '@agoric/time';
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
// Update the debt by adding the new interest on every period, as
|
|
11
15
|
// indicated by the periodNotifier
|
|
12
16
|
|
|
@@ -45,7 +49,7 @@ export const makeDebtCalculator = debtCalculatorConfig => {
|
|
|
45
49
|
const config = { ...configMinusGetDebt, getDebt };
|
|
46
50
|
|
|
47
51
|
const periodObserver = Far('periodObserver', {
|
|
48
|
-
/** @type {(timestamp:
|
|
52
|
+
/** @type {(timestamp: TimestampRecord) => void} */
|
|
49
53
|
updateState: timestamp => {
|
|
50
54
|
let updatedLoan = false;
|
|
51
55
|
// we could calculate the number of required updates and multiply by a power
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintAndSellNFT.d.ts","sourceRoot":"","sources":["mintAndSellNFT.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAJW,GAAG,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACjB,CAAC;;EA4FJ"}
|
|
1
|
+
{"version":3,"file":"mintAndSellNFT.d.ts","sourceRoot":"","sources":["mintAndSellNFT.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAJW,GAAG,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACjB,CAAC;;EA4FJ"}
|
|
@@ -5,6 +5,10 @@ import { Far } from '@endo/marshal';
|
|
|
5
5
|
|
|
6
6
|
import { notForProductionUse } from '@agoric/internal/src/magic-cookie-test-only.js';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @import {start as sellItemStart} from './sellItems.js';
|
|
10
|
+
*/
|
|
11
|
+
|
|
8
12
|
/**
|
|
9
13
|
* This contract mints non-fungible tokens and creates a selling contract
|
|
10
14
|
* instance to sell the tokens in exchange for some sort of money.
|
|
@@ -39,7 +43,7 @@ const start = zcf => {
|
|
|
39
43
|
|
|
40
44
|
/**
|
|
41
45
|
* @param {object} obj
|
|
42
|
-
* @param {Installation<
|
|
46
|
+
* @param {Installation<typeof sellItemStart>} obj.sellItemsInstallation
|
|
43
47
|
* @param {*} obj.customValueProperties
|
|
44
48
|
* @param {number} obj.count
|
|
45
49
|
* @param {*} obj.moneyIssuer
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {TimerService} from '@agoric/time';
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* This contract is inspired by the description of an OTC Desk smart
|
|
3
6
|
* contract in this article:
|
|
@@ -55,7 +58,7 @@ export function start(zcf: ZCF<Record<string, any>>): {
|
|
|
55
58
|
* @returns {Promise<Payment>}
|
|
56
59
|
*/
|
|
57
60
|
makeRemoveInventoryInvitation: () => Promise<Payment>;
|
|
58
|
-
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority:
|
|
61
|
+
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority: TimerService, deadline: any) => Promise<Payment>;
|
|
59
62
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
60
63
|
/**
|
|
61
64
|
* The inventory can be added in bulk before any quotes are made
|
|
@@ -73,7 +76,8 @@ export function start(zcf: ZCF<Record<string, any>>): {
|
|
|
73
76
|
* @returns {Promise<Payment>}
|
|
74
77
|
*/
|
|
75
78
|
makeRemoveInventoryInvitation: () => Promise<Payment>;
|
|
76
|
-
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority:
|
|
79
|
+
makeQuote: (price: AmountKeywordRecord, assets: AmountKeywordRecord, timeAuthority: TimerService, deadline: any) => Promise<Payment>;
|
|
77
80
|
}>;
|
|
78
81
|
};
|
|
82
|
+
import type { TimerService } from '@agoric/time';
|
|
79
83
|
//# sourceMappingURL=otcDesk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otcDesk.d.ts","sourceRoot":"","sources":["otcDesk.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;QAoE/B;;;;;;WAMG;2DAFQ,mBAAmB,KACjB,OAAO,CAAC,OAAO,CAAC;QAM7B;;;;;;WAMG;6CADU,OAAO,CAAC,OAAO,CAAC;2BAzEpB,mBAAmB,UACnB,mBAAmB,iBACnB,
|
|
1
|
+
{"version":3,"file":"otcDesk.d.ts","sourceRoot":"","sources":["otcDesk.js"],"names":[],"mappings":"AAUA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;QAoE/B;;;;;;WAMG;2DAFQ,mBAAmB,KACjB,OAAO,CAAC,OAAO,CAAC;QAM7B;;;;;;WAMG;6CADU,OAAO,CAAC,OAAO,CAAC;2BAzEpB,mBAAmB,UACnB,mBAAmB,iBACnB,YAAY,YACZ,GAAG,KACD,OAAO,CAAC,OAAO,CAAC;;QAqD3B;;;;;;WAMG;2DAFQ,mBAAmB,KACjB,OAAO,CAAC,OAAO,CAAC;QAM7B;;;;;;WAMG;6CADU,OAAO,CAAC,OAAO,CAAC;2BAzEpB,mBAAmB,UACnB,mBAAmB,iBACnB,YAAY,YACZ,GAAG,KACD,OAAO,CAAC,OAAO,CAAC;;EA8E9B;kCArI8B,cAAc"}
|
package/src/contracts/otcDesk.js
CHANGED
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
atomicTransfer,
|
|
9
9
|
} from '../contractSupport/index.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @import {TimerService} from '@agoric/time';
|
|
13
|
+
*/
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* This contract is inspired by the description of an OTC Desk smart
|
|
13
17
|
* contract in this article:
|
|
@@ -58,7 +62,7 @@ const start = zcf => {
|
|
|
58
62
|
*
|
|
59
63
|
* @param {AmountKeywordRecord} price
|
|
60
64
|
* @param {AmountKeywordRecord} assets
|
|
61
|
-
* @param {
|
|
65
|
+
* @param {TimerService} timeAuthority
|
|
62
66
|
* @param {any} deadline
|
|
63
67
|
* @returns {Promise<Payment>}
|
|
64
68
|
*/
|
|
@@ -12,7 +12,7 @@ export type PriceAggregatorContract = ContractOf<typeof start>;
|
|
|
12
12
|
* is a stub until we complete what is now in `fluxAggregatorKit.js`.
|
|
13
13
|
*
|
|
14
14
|
* @param {ZCF<{
|
|
15
|
-
* timer:
|
|
15
|
+
* timer: TimerService,
|
|
16
16
|
* POLL_INTERVAL: bigint,
|
|
17
17
|
* brandIn: Brand<'nat'>,
|
|
18
18
|
* brandOut: Brand<'nat'>,
|
|
@@ -25,7 +25,7 @@ export type PriceAggregatorContract = ContractOf<typeof start>;
|
|
|
25
25
|
* }} privateArgs
|
|
26
26
|
*/
|
|
27
27
|
export function start(zcf: ZCF<{
|
|
28
|
-
timer:
|
|
28
|
+
timer: TimerService;
|
|
29
29
|
POLL_INTERVAL: bigint;
|
|
30
30
|
brandIn: Brand<"nat">;
|
|
31
31
|
brandOut: Brand<"nat">;
|
|
@@ -44,9 +44,9 @@ export function start(zcf: ZCF<{
|
|
|
44
44
|
* directly to manage the price submissions as well as to terminate the
|
|
45
45
|
* relationship.
|
|
46
46
|
*
|
|
47
|
-
* @param {Instance | string} [oracleKey]
|
|
47
|
+
* @param {Instance<unknown> | string} [oracleKey]
|
|
48
48
|
*/
|
|
49
|
-
makeOracleInvitation: (oracleKey?: Instance | string) => Promise<Invitation<{
|
|
49
|
+
makeOracleInvitation: (oracleKey?: Instance<unknown> | string) => Promise<Invitation<{
|
|
50
50
|
admin: OracleAdmin<Price>;
|
|
51
51
|
invitationMakers: {
|
|
52
52
|
PushPrice: (price: ParsableNumber) => Promise<Invitation<void>>;
|
|
@@ -58,11 +58,11 @@ export function start(zcf: ZCF<{
|
|
|
58
58
|
/** @param {OracleKey} oracleKey */
|
|
59
59
|
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
60
60
|
/**
|
|
61
|
-
* @param {Instance | string} [oracleInstance]
|
|
61
|
+
* @param {Instance<unknown> | string} [oracleInstance]
|
|
62
62
|
* @param {OracleQuery} [query]
|
|
63
63
|
* @returns {Promise<OracleAdmin<Price>>}
|
|
64
64
|
*/
|
|
65
|
-
initOracle: (oracleInstance?: Instance | string, query?: OracleQuery) => Promise<OracleAdmin<Price>>;
|
|
65
|
+
initOracle: (oracleInstance?: Instance<unknown> | string, query?: OracleQuery) => Promise<OracleAdmin<Price>>;
|
|
66
66
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
67
67
|
/**
|
|
68
68
|
* An "oracle invitation" is an invitation to be able to submit data to
|
|
@@ -72,9 +72,9 @@ export function start(zcf: ZCF<{
|
|
|
72
72
|
* directly to manage the price submissions as well as to terminate the
|
|
73
73
|
* relationship.
|
|
74
74
|
*
|
|
75
|
-
* @param {Instance | string} [oracleKey]
|
|
75
|
+
* @param {Instance<unknown> | string} [oracleKey]
|
|
76
76
|
*/
|
|
77
|
-
makeOracleInvitation: (oracleKey?: Instance | string) => Promise<Invitation<{
|
|
77
|
+
makeOracleInvitation: (oracleKey?: Instance<unknown> | string) => Promise<Invitation<{
|
|
78
78
|
admin: OracleAdmin<Price>;
|
|
79
79
|
invitationMakers: {
|
|
80
80
|
PushPrice: (price: ParsableNumber) => Promise<Invitation<void>>;
|
|
@@ -86,11 +86,11 @@ export function start(zcf: ZCF<{
|
|
|
86
86
|
/** @param {OracleKey} oracleKey */
|
|
87
87
|
deleteOracle: (oracleKey: OracleKey) => Promise<void>;
|
|
88
88
|
/**
|
|
89
|
-
* @param {Instance | string} [oracleInstance]
|
|
89
|
+
* @param {Instance<unknown> | string} [oracleInstance]
|
|
90
90
|
* @param {OracleQuery} [query]
|
|
91
91
|
* @returns {Promise<OracleAdmin<Price>>}
|
|
92
92
|
*/
|
|
93
|
-
initOracle: (oracleInstance?: Instance | string, query?: OracleQuery) => Promise<OracleAdmin<Price>>;
|
|
93
|
+
initOracle: (oracleInstance?: Instance<unknown> | string, query?: OracleQuery) => Promise<OracleAdmin<Price>>;
|
|
94
94
|
}>;
|
|
95
95
|
publicFacet: {
|
|
96
96
|
getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
|
|
@@ -105,6 +105,7 @@ export function start(zcf: ZCF<{
|
|
|
105
105
|
}>;
|
|
106
106
|
}>;
|
|
107
107
|
import type { ContractOf } from '../zoeService/utils.js';
|
|
108
|
+
import type { TimerService } from '@agoric/time';
|
|
108
109
|
import type { ZCF } from '@agoric/zoe';
|
|
109
110
|
import type { Remote } from '@agoric/internal';
|
|
110
111
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAggregator.d.ts","sourceRoot":"","sources":["priceAggregator.js"],"names":[],"mappings":"6BA4Cc,MAAM,GAAG,MAAM,GAAG,MAAM;oCAEzB,QAAQ,CAAC,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;oBAGlD,cAAc,GAAG,KAAK;sCAqlBtB,WAAW,OAAO,KAAK,CAAC;AAhlBtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2BAbW,IAAI;IACZ,KAAK,EAAE,YAAY,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC3B,CAAC,eACM;IACR,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAChC;;QAiXA;;;;;;;;;WASG;2CADQ,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM;mBAaN,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;sCAHQ,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,UAC1B,WAAW,KACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;QA/ExC;;;;;;;;;WASG;2CADQ,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM;mBAaN,WAAW,CAAC,KAAK,CAAC;8BAAoB;gBAAC,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAA;aAAC;;;;;QA0CtI,mCAAmC;kCAAvB,SAAS;QAarB;;;;WAIG;sCAHQ,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,UAC1B,WAAW,KACT,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;;;;;QAoHxC,sBAAsB;;;;;QAAtB,sBAAsB;;;GAOzB;gCAjmB4B,wBAAwB;kCAGtB,cAAc;yBADF,aAAa;4BAJ/B,kBAAkB;sCAGkC,4BAA4B;gCAC9D,aAAa"}
|
|
@@ -35,6 +35,11 @@ import {
|
|
|
35
35
|
* @import {ContractOf} from '../zoeService/utils.js';
|
|
36
36
|
* @import {PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
37
37
|
* @import {Invitation, ZCF, ZCFSeat} from '@agoric/zoe';
|
|
38
|
+
* @import {TimerService} from '@agoric/time';
|
|
39
|
+
* @import {Timestamp} from '@agoric/time';
|
|
40
|
+
* @import {TimerWaker} from '@agoric/time';
|
|
41
|
+
* @import {TimestampRecord} from '@agoric/time';
|
|
42
|
+
* @import {OracleContract} from './oracle.js';
|
|
38
43
|
*/
|
|
39
44
|
|
|
40
45
|
/** @typedef {bigint | number | string} ParsableNumber */
|
|
@@ -55,7 +60,7 @@ const priceDescriptionFromQuote = quote => quote.quoteAmount.value[0];
|
|
|
55
60
|
* is a stub until we complete what is now in `fluxAggregatorKit.js`.
|
|
56
61
|
*
|
|
57
62
|
* @param {ZCF<{
|
|
58
|
-
* timer:
|
|
63
|
+
* timer: TimerService,
|
|
59
64
|
* POLL_INTERVAL: bigint,
|
|
60
65
|
* brandIn: Brand<'nat'>,
|
|
61
66
|
* brandOut: Brand<'nat'>,
|
|
@@ -128,7 +133,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
128
133
|
|
|
129
134
|
/**
|
|
130
135
|
* @typedef {object} OracleRecord
|
|
131
|
-
* @property {(timestamp:
|
|
136
|
+
* @property {(timestamp: Timestamp) => Promise<void>} [querier]
|
|
132
137
|
* @property {Ratio} lastSample
|
|
133
138
|
* @property {OracleKey} oracleKey
|
|
134
139
|
*/
|
|
@@ -145,7 +150,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
145
150
|
|
|
146
151
|
// Wake every POLL_INTERVAL and run the queriers.
|
|
147
152
|
const repeaterP = E(timer).makeRepeater(0n, POLL_INTERVAL);
|
|
148
|
-
/** @type {
|
|
153
|
+
/** @type {TimerWaker} */
|
|
149
154
|
const waker = Far('waker', {
|
|
150
155
|
async wake(timestamp) {
|
|
151
156
|
// Run all the queriers.
|
|
@@ -167,7 +172,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
167
172
|
/**
|
|
168
173
|
* @param {object} param0
|
|
169
174
|
* @param {Ratio} [param0.overridePrice]
|
|
170
|
-
* @param {
|
|
175
|
+
* @param {TimestampRecord} [param0.timestamp]
|
|
171
176
|
*/
|
|
172
177
|
const makeCreateQuote = ({ overridePrice, timestamp } = {}) =>
|
|
173
178
|
/**
|
|
@@ -262,7 +267,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
262
267
|
);
|
|
263
268
|
|
|
264
269
|
/**
|
|
265
|
-
* @param {
|
|
270
|
+
* @param {Timestamp} timestamp
|
|
266
271
|
*/
|
|
267
272
|
const updateQuote = async timestamp => {
|
|
268
273
|
timestamp = TimeMath.coerceTimestampRecord(timestamp, timerBrand);
|
|
@@ -442,7 +447,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
442
447
|
* directly to manage the price submissions as well as to terminate the
|
|
443
448
|
* relationship.
|
|
444
449
|
*
|
|
445
|
-
* @param {Instance | string} [oracleKey]
|
|
450
|
+
* @param {Instance<unknown> | string} [oracleKey]
|
|
446
451
|
*/
|
|
447
452
|
makeOracleInvitation: async oracleKey => {
|
|
448
453
|
/**
|
|
@@ -511,7 +516,7 @@ const start = async (zcf, privateArgs) => {
|
|
|
511
516
|
await updateQuote(deletedNow);
|
|
512
517
|
},
|
|
513
518
|
/**
|
|
514
|
-
* @param {Instance | string} [oracleInstance]
|
|
519
|
+
* @param {Instance<unknown> | string} [oracleInstance]
|
|
515
520
|
* @param {OracleQuery} [query]
|
|
516
521
|
* @returns {Promise<OracleAdmin<Price>>}
|
|
517
522
|
*/
|
|
@@ -592,17 +597,16 @@ const start = async (zcf, privateArgs) => {
|
|
|
592
597
|
|
|
593
598
|
// Obtain the oracle's publicFacet.
|
|
594
599
|
assert(oracleInstance);
|
|
595
|
-
const oracle =
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
);
|
|
600
|
+
const oracle = /** @type {OracleContract['publicFacet']} */ (
|
|
601
|
+
await E(zoe).getPublicFacet(oracleInstance)
|
|
602
|
+
);
|
|
599
603
|
assert(records.has(record), 'Oracle record is already deleted');
|
|
600
604
|
|
|
601
|
-
/** @type {
|
|
605
|
+
/** @type {Timestamp} */
|
|
602
606
|
let lastWakeTimestamp = 0n;
|
|
603
607
|
|
|
604
608
|
/**
|
|
605
|
-
* @param {
|
|
609
|
+
* @param {Timestamp} timestamp
|
|
606
610
|
*/
|
|
607
611
|
record.querier = async timestamp => {
|
|
608
612
|
// Submit the query.
|
|
@@ -9,7 +9,7 @@ type OracleAdmin<R extends unknown> = {
|
|
|
9
9
|
pushResult: (result: R) => Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
type OracleKey = {} | string;
|
|
12
|
-
type PriceAggregatorKit = Pick<
|
|
12
|
+
type PriceAggregatorKit = Pick<PriceAggregatorContract, "creatorFacet" | "publicFacet">;
|
|
13
13
|
type OracleQuery = Record<string, unknown> & {
|
|
14
14
|
kind?: string;
|
|
15
15
|
increment?: bigint;
|
|
@@ -74,4 +74,5 @@ type OracleHandler = {
|
|
|
74
74
|
*/
|
|
75
75
|
onReply: (query: OracleQuery, reply: unknown, requiredFee: Amount | undefined) => void;
|
|
76
76
|
};
|
|
77
|
+
import type { PriceAggregatorContract } from './priceAggregator.js';
|
|
77
78
|
//# sourceMappingURL=priceAggregatorTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregatorTypes.d.ts","sourceRoot":"","sources":["priceAggregatorTypes.js"],"names":[],"mappings":"iBACsB,CAAC;;;;YAET,MAAM,OAAO,CAAC,IAAI,CAAC;;;;gBAEnB,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;
|
|
1
|
+
{"version":3,"file":"priceAggregatorTypes.d.ts","sourceRoot":"","sources":["priceAggregatorTypes.js"],"names":[],"mappings":"iBACsB,CAAC;;;;YAET,MAAM,OAAO,CAAC,IAAI,CAAC;;;;gBAEnB,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;iBAS7B,EAAE,GAAG,MAAM;0BAIX,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,aAAa,CAAC;mBAI7D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;yBAMU,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,UAAU,CAAC;;;;WAExC,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,OAAO,CAAC;;iFAOtC,IAAI,CAAC,UAAU,CAAC;;;;;;;;oBAMf,MAAM,mBAAmB;;;;4BAEzB,wCAAwC;;;;4BAExC,MAAM,OAAO,CAAC,UAAU,CAAC;;;mBAMzB,aAAa;;;gBAKb,CAAC,aAAa,EAAE,uBAAuB,KAC7C,kBAAkB;;;kBAKZ,kBAAkB;iBAClB,iBAAiB;cACjB,QAAQ;;;WAKR,OAAO;;;;;;;aAMP,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC;;;;aAEzD,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI;;;;aAE7C,CAAC,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,GAAG,SAAS,KACtC,IAAI;;6CA7E8B,sBAAsB"}
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
* Rather than waiting for the polling query, push a result directly from this oracle
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import {PriceAggregatorContract} from './priceAggregator.js';
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
/**
|
|
11
15
|
* @typedef {{} | string} OracleKey
|
|
12
16
|
*/
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
|
-
* @typedef {Pick<
|
|
19
|
+
* @typedef {Pick<PriceAggregatorContract, 'creatorFacet' | 'publicFacet'>} PriceAggregatorKit
|
|
16
20
|
*/
|
|
17
21
|
|
|
18
22
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepare(zcf: ZCF<ScaledPriceAuthorityOpts>, privateArgs: object, baggage:
|
|
1
|
+
export function prepare(zcf: ZCF<ScaledPriceAuthorityOpts>, privateArgs: object, baggage: Baggage): Promise<{
|
|
2
2
|
publicFacet: import("@endo/exo").Guarded<{
|
|
3
3
|
getPriceAuthority: () => Promise<PriceAuthority>;
|
|
4
4
|
}>;
|
|
@@ -19,5 +19,6 @@ export type ScaledPriceAuthorityOpts = {
|
|
|
19
19
|
initialPrice?: Ratio | undefined;
|
|
20
20
|
};
|
|
21
21
|
import type { ZCF } from '@agoric/zoe';
|
|
22
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
22
23
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
23
24
|
//# sourceMappingURL=scaledPriceAuthority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"AAuCO,6BALI,IAAI,wBAAwB,CAAC,eAC7B,MAAM,WACN,OAAO;;;;GA2DjB;;0BA5Ea,IAAI,CAAC,cAAc,CAAC;;;;aACpB,KAAK;;;;cACL,KAAK;;;;;;yBARG,aAAa;6BACT,kBAAkB;oCAFiD,4BAA4B"}
|
|
@@ -12,6 +12,7 @@ import { provideQuoteMint } from '../contractSupport/priceAuthorityQuoteMint.js'
|
|
|
12
12
|
/**
|
|
13
13
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
14
14
|
* @import {ZCF} from '@agoric/zoe';
|
|
15
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -33,7 +34,7 @@ import { provideQuoteMint } from '../contractSupport/priceAuthorityQuoteMint.js'
|
|
|
33
34
|
*
|
|
34
35
|
* @param {ZCF<ScaledPriceAuthorityOpts>} zcf
|
|
35
36
|
* @param {object} privateArgs
|
|
36
|
-
* @param {
|
|
37
|
+
* @param {Baggage} baggage
|
|
37
38
|
*/
|
|
38
39
|
// 'prepare' is deprecated but still supported
|
|
39
40
|
export const prepare = async (zcf, privateArgs, baggage) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";oBAGc,MAAM,MAAM;uBACZ,MAAM,MAAM;;;yBAGZ,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;6BAEtD,oBAAoB,GAAG,oBAAoB;;2BAK1C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WACnB,MAAM;iBACN,MAAM;2BACN,YAAY;kBACZ,MAAM;;;0BAGN,QAAQ;2BACR,qBAAqB;uBACrB,QAAQ;0BACR,oBAAoB;;;gBAGpB,CAAC,UAAU,EAAE,mBAAmB,KAAK,OAAO,CAAC,eAAe,CAAC;eAC7D,MAAM,MAAM;;;oBAKZ,MAAM,MAAM;oBACZ,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;;;wBAKrD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;;0BAErD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;;2BAGrD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;gCAGrD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;mCAErD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;wBAErD,MAAM,MAAM;;;;;wBACZ,MAAM,MAAM;;;;;mBAEZ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,KAAK,MAAM;;;;;oBAG7C,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,KAAK,MAAM;;;;;uBAG7C,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC"}
|
package/src/issuerStorage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function provideIssuerStorage(zcfBaggage:
|
|
1
|
+
export function provideIssuerStorage(zcfBaggage: Baggage): {
|
|
2
2
|
storeIssuerKeywordRecord: (uncleanIssuerKeywordRecord: IssuerKeywordRecord) => Promise<{
|
|
3
3
|
issuers: IssuerKeywordRecord;
|
|
4
4
|
brands: BrandKeywordRecord;
|
|
@@ -11,5 +11,6 @@ export function provideIssuerStorage(zcfBaggage: import("@agoric/vat-data").Bagg
|
|
|
11
11
|
getIssuerRecords: (issuers: Issuer[]) => IssuerRecords;
|
|
12
12
|
instantiate: (issuerRecords?: any[]) => void;
|
|
13
13
|
};
|
|
14
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
14
15
|
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
15
16
|
//# sourceMappingURL=issuerStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"AAqBO,iDAFI,OAAO;2DAwHL,mBAAmB,KACjB,OAAO,CAAC;QAAE,OAAO,EAAE,mBAAmB,CAAC;QAC7B,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC;2BAnDzC,IAAI,CAAC,MAAM,CAAC,KACV,OAAO,CAAE,eAAe,CAAC;sCAzB3B,eAAe,KACb,eAAe;;wBAyFH,CAAC,SAAZ,SAAU,UACb,MAAM,CAAC,CAAC,CAAC,KACP,KAAK,CAAC,CAAC,CAAC;wBASI,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,KACN,MAAM,CAAC,CAAC,CAAC;gCASX,MAAM,EAAE,KACN,aAAa;;EA2B3B;6BAjMyB,kBAAkB;qCADV,aAAa"}
|
package/src/issuerStorage.js
CHANGED
|
@@ -11,12 +11,13 @@ const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
|
|
|
11
11
|
/**
|
|
12
12
|
* @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
|
|
13
13
|
* @import {ZoeIssuerRecord} from '@agoric/zoe';
|
|
14
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Make the Issuer Storage.
|
|
18
19
|
*
|
|
19
|
-
* @param {
|
|
20
|
+
* @param {Baggage} zcfBaggage
|
|
20
21
|
*/
|
|
21
22
|
export const provideIssuerStorage = zcfBaggage => {
|
|
22
23
|
/** @type {WeakMapStore<Brand, ZoeIssuerRecord>} */
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
3
|
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
4
|
+
* @import {ExitRule} from './types-index.js';
|
|
5
|
+
* @import {InvitationDetails} from './types-index.js';
|
|
4
6
|
*/
|
|
5
7
|
export const KeywordShape: import("@endo/patterns").Matcher;
|
|
6
8
|
/** @type {TypedPattern<InvitationHandle>} */
|
|
@@ -40,10 +42,10 @@ export namespace FullProposalShape {
|
|
|
40
42
|
export const ProposalShape: import("@endo/patterns").Matcher;
|
|
41
43
|
export const EmptyProposalShape: import("@endo/patterns").Matcher;
|
|
42
44
|
export function isOnDemandExitRule(exit: any): boolean;
|
|
43
|
-
export function isWaivedExitRule(exit:
|
|
44
|
-
export function isAfterDeadlineExitRule(exit:
|
|
45
|
-
/** @type {TypedPattern<
|
|
46
|
-
export const InvitationElementShape: TypedPattern<
|
|
45
|
+
export function isWaivedExitRule(exit: ExitRule): exit is WaivedExitRule;
|
|
46
|
+
export function isAfterDeadlineExitRule(exit: ExitRule): exit is AfterDeadlineExitRule;
|
|
47
|
+
/** @type {TypedPattern<InvitationDetails>} */
|
|
48
|
+
export const InvitationElementShape: TypedPattern<InvitationDetails>;
|
|
47
49
|
export const OfferHandlerI: import("@endo/patterns").InterfaceGuard<{
|
|
48
50
|
handle: import("@endo/patterns").MethodGuard;
|
|
49
51
|
}>;
|
|
@@ -172,6 +174,8 @@ export namespace PriceQuoteShape {
|
|
|
172
174
|
}
|
|
173
175
|
import type { TypedPattern } from '@agoric/internal';
|
|
174
176
|
import type { ZoeIssuerRecord } from '@agoric/zoe';
|
|
177
|
+
import type { ExitRule } from './types-index.js';
|
|
175
178
|
import type { AfterDeadlineExitRule } from '@agoric/zoe';
|
|
179
|
+
import type { InvitationDetails } from './types-index.js';
|
|
176
180
|
import { AmountShape } from '@agoric/ertp';
|
|
177
181
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,4CAA4C;AAC5C,gCADW,aAAa,eAAe,CAAC,CAQtC;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAGD,8CAA8C;AAC9C,qCADW,aAAa,iBAAiB,CAAC,CAMvC;AAEH;;GAEG;AAEH,0EAGG;AAEH,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAAuD;AACvD,2DAGE;AAEF,0EAQE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;GAKG;AAEH,6DASE;AAEF;;GAKG;;;;;kCAjY4B,kBAAkB;qCACQ,aAAa;8BAC3C,kBAAkB;2CADY,aAAa;uCAElC,kBAAkB;4BAT/C,cAAc"}
|
package/src/typeGuards.js
CHANGED
|
@@ -16,6 +16,8 @@ import { TimestampShape } from '@agoric/time';
|
|
|
16
16
|
/**
|
|
17
17
|
* @import {TypedPattern} from '@agoric/internal';
|
|
18
18
|
* @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
|
|
19
|
+
* @import {ExitRule} from './types-index.js';
|
|
20
|
+
* @import {InvitationDetails} from './types-index.js';
|
|
19
21
|
*/
|
|
20
22
|
|
|
21
23
|
// keywords have an initial cap
|
|
@@ -116,7 +118,7 @@ export const isOnDemandExitRule = exit => {
|
|
|
116
118
|
harden(isOnDemandExitRule);
|
|
117
119
|
|
|
118
120
|
/**
|
|
119
|
-
* @param {
|
|
121
|
+
* @param {ExitRule} exit
|
|
120
122
|
* @returns {exit is WaivedExitRule}
|
|
121
123
|
*/
|
|
122
124
|
export const isWaivedExitRule = exit => {
|
|
@@ -126,7 +128,7 @@ export const isWaivedExitRule = exit => {
|
|
|
126
128
|
harden(isWaivedExitRule);
|
|
127
129
|
|
|
128
130
|
/**
|
|
129
|
-
* @param {
|
|
131
|
+
* @param {ExitRule} exit
|
|
130
132
|
* @returns {exit is AfterDeadlineExitRule}
|
|
131
133
|
*/
|
|
132
134
|
export const isAfterDeadlineExitRule = exit => {
|
|
@@ -135,7 +137,7 @@ export const isAfterDeadlineExitRule = exit => {
|
|
|
135
137
|
};
|
|
136
138
|
harden(isAfterDeadlineExitRule);
|
|
137
139
|
|
|
138
|
-
/** @type {TypedPattern<
|
|
140
|
+
/** @type {TypedPattern<InvitationDetails>} */
|
|
139
141
|
export const InvitationElementShape = M.splitRecord({
|
|
140
142
|
description: M.string(),
|
|
141
143
|
handle: InvitationHandleShape,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export function provideEscrowStorage(baggage:
|
|
1
|
+
export function provideEscrowStorage(baggage: Baggage): {
|
|
2
2
|
createPurse: CreatePurse;
|
|
3
3
|
provideLocalPurse: ProvideLocalPurse;
|
|
4
4
|
withdrawPayments: WithdrawPayments;
|
|
5
5
|
depositPayments: DepositPayments;
|
|
6
6
|
};
|
|
7
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
7
8
|
//# sourceMappingURL=escrowStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"AAqBO,8CAFI,OAAO;;;;;EA8GjB;6BArHyB,kBAAkB"}
|
|
@@ -10,13 +10,14 @@ import { cleanKeywords } from '../cleanProposal.js';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @import {WeakMapStore} from '@agoric/store';
|
|
13
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Store the pool purses whose purpose is to escrow assets, with one
|
|
17
18
|
* purse per brand.
|
|
18
19
|
*
|
|
19
|
-
* @param {
|
|
20
|
+
* @param {Baggage} baggage
|
|
20
21
|
*/
|
|
21
22
|
export const provideEscrowStorage = baggage => {
|
|
22
23
|
/** @type {WeakMapStore<Brand, Purse>} */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeInstanceAdminStorage(baggage:
|
|
1
|
+
export function makeInstanceAdminStorage(baggage: Baggage): import("@endo/exo").GuardedKit<{
|
|
2
2
|
accessor: {
|
|
3
3
|
getPublicFacet(instance: any): any;
|
|
4
4
|
getBrands(instance: any): any;
|
|
@@ -13,7 +13,7 @@ export function makeInstanceAdminStorage(baggage: import("@agoric/vat-data").Bag
|
|
|
13
13
|
deleteInstanceAdmin(instance: any): void;
|
|
14
14
|
};
|
|
15
15
|
}>;
|
|
16
|
-
export function makeInstanceAdminMaker(zoeBaggage:
|
|
16
|
+
export function makeInstanceAdminMaker(zoeBaggage: Baggage, seatHandleToZoeSeatAdmin: WeakMapStore<SeatHandle, ZoeSeatAdmin>): (instanceHandle: any, zoeInstanceStorageManager: any, adminNode: any) => import("@agoric/swingset-liveslots").KindFacet<{
|
|
17
17
|
getPublicFacet: ({ state }: {
|
|
18
18
|
state: any;
|
|
19
19
|
}) => any;
|
|
@@ -100,5 +100,6 @@ export type State = MutableState & ImmutableState;
|
|
|
100
100
|
export type MethodContext = {
|
|
101
101
|
state: State;
|
|
102
102
|
};
|
|
103
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
103
104
|
import type { WeakMapStore } from '@agoric/store';
|
|
104
105
|
//# sourceMappingURL=instanceAdminStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAuDO,kDADK,OAAO;;;;;;;;;;;;;;GA2DlB;AA0JM,mDAHI,OAAO,4BACP,aAAa,UAAU,EAAE,YAAY,CAAC,IAgCvC,mBAAc,EAAE,8BAAyB,EAAE,cAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ7D;6BAvDY,QAAQ,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACR,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACR,KAAK,EAAE,KAAK,CAAC;CACd;6BA9OsB,kBAAkB;kCADb,eAAe"}
|
|
@@ -20,6 +20,7 @@ import { makeZoeSeatAdminFactory } from './zoeSeat.js';
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @import {WeakMapStore} from '@agoric/store';
|
|
23
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -51,7 +52,7 @@ const InstanceAdminStorageIKit = harden({
|
|
|
51
52
|
}),
|
|
52
53
|
});
|
|
53
54
|
|
|
54
|
-
/** @param {
|
|
55
|
+
/** @param {Baggage} baggage */
|
|
55
56
|
export const makeInstanceAdminStorage = baggage => {
|
|
56
57
|
const makeIAS = prepareExoClassKit(
|
|
57
58
|
baggage,
|
|
@@ -114,8 +115,8 @@ export const makeInstanceAdminStorage = baggage => {
|
|
|
114
115
|
harden(makeInstanceAdminStorage);
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
|
-
* @param {
|
|
118
|
-
* @param {ReturnType<makeZoeSeatAdminFactory>} makeZoeSeatAdminKit
|
|
118
|
+
* @param {Baggage} zoeBaggage
|
|
119
|
+
* @param {ReturnType<typeof makeZoeSeatAdminFactory>} makeZoeSeatAdminKit
|
|
119
120
|
*/
|
|
120
121
|
const makeInstanceAdminBehavior = (zoeBaggage, makeZoeSeatAdminKit) => {
|
|
121
122
|
const makeSeatHandle = defineDurableHandle(zoeBaggage, 'Seat');
|
|
@@ -261,7 +262,7 @@ const helperBehavior = {
|
|
|
261
262
|
*/
|
|
262
263
|
|
|
263
264
|
/**
|
|
264
|
-
* @param {
|
|
265
|
+
* @param {Baggage} zoeBaggage
|
|
265
266
|
* @param {WeakMapStore<SeatHandle, ZoeSeatAdmin>} seatHandleToZoeSeatAdmin
|
|
266
267
|
*/
|
|
267
268
|
export const makeInstanceAdminMaker = (
|