@agoric/ertp 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 +12 -14
- package/src/amountMath.d.ts +1 -1
- package/src/amountMath.d.ts.map +1 -1
- package/src/amountMath.js +0 -2
- package/src/displayInfo.d.ts.map +1 -1
- package/src/displayInfo.js +0 -2
- package/src/index.js +0 -3
- package/src/issuerKit.d.ts.map +1 -1
- package/src/issuerKit.js +0 -2
- package/src/legacy-payment-helpers.d.ts.map +1 -1
- package/src/legacy-payment-helpers.js +0 -2
- package/src/mathHelpers/copyBagMathHelpers.d.ts +3 -2
- package/src/mathHelpers/copyBagMathHelpers.d.ts.map +1 -1
- package/src/mathHelpers/copyBagMathHelpers.js +6 -5
- package/src/mathHelpers/copySetMathHelpers.d.ts.map +1 -1
- package/src/mathHelpers/copySetMathHelpers.js +0 -2
- package/src/mathHelpers/natMathHelpers.d.ts.map +1 -1
- package/src/mathHelpers/natMathHelpers.js +0 -2
- package/src/mathHelpers/setMathHelpers.d.ts.map +1 -1
- package/src/mathHelpers/setMathHelpers.js +0 -2
- package/src/payment.d.ts +3 -1
- package/src/payment.d.ts.map +1 -1
- package/src/payment.js +7 -5
- package/src/paymentLedger.d.ts.map +1 -1
- package/src/paymentLedger.js +2 -4
- package/src/purse.d.ts +9 -5
- package/src/purse.d.ts.map +1 -1
- package/src/purse.js +10 -4
- package/src/transientNotifier.d.ts.map +1 -1
- package/src/transientNotifier.js +1 -2
- package/src/typeGuards.d.ts +4 -1
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +2 -3
- package/src/types.js +474 -0
- package/exported.d.ts +0 -37
- package/exported.js +0 -2
- package/src/types.ts +0 -474
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/ertp",
|
|
3
|
-
"version": "0.17.0",
|
|
3
|
+
"version": "0.17.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
4
4
|
"description": "Electronic Rights Transfer Protocol (ERTP). A smart contract framework for exchanging electronic rights",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "exit 0",
|
|
12
|
-
"prepack": "yarn run -T
|
|
13
|
-
"postpack": "
|
|
12
|
+
"prepack": "yarn run -T prepack-package",
|
|
13
|
+
"postpack": "yarn run -T postpack-package",
|
|
14
14
|
"test": "ava",
|
|
15
15
|
"test:c8": "c8 --all ${C8_OPTIONS:-} ava",
|
|
16
16
|
"test:xs": "yarn test:xs-worker",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 test/swingsetTests",
|
|
19
19
|
"lint-fix": "yarn lint:eslint --fix",
|
|
20
20
|
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
21
|
-
"lint:eslint": "
|
|
21
|
+
"lint:eslint": "node ../../scripts/eslint-repo.mjs .",
|
|
22
22
|
"lint:types": "yarn run -T tsc"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@agoric/notifier": "0.7.0",
|
|
43
|
-
"@agoric/store": "0.10.0",
|
|
44
|
-
"@agoric/vat-data": "0.6.0",
|
|
45
|
-
"@agoric/zone": "0.3.0",
|
|
42
|
+
"@agoric/notifier": "0.7.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
43
|
+
"@agoric/store": "0.10.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
44
|
+
"@agoric/vat-data": "0.6.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
45
|
+
"@agoric/zone": "0.3.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
46
46
|
"@endo/errors": "^1.2.13",
|
|
47
47
|
"@endo/eventual-send": "^1.3.4",
|
|
48
48
|
"@endo/far": "^1.1.14",
|
|
@@ -52,17 +52,15 @@
|
|
|
52
52
|
"@endo/promise-kit": "^1.1.13"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@agoric/swingset-vat": "0.33.0",
|
|
55
|
+
"@agoric/swingset-vat": "0.33.1-upgrade-23-dev-bd79330.0.bd79330",
|
|
56
56
|
"@endo/bundle-source": "^4.1.2",
|
|
57
57
|
"@fast-check/ava": "^1.1.5",
|
|
58
|
-
"ava": "^
|
|
58
|
+
"ava": "^6.4.1",
|
|
59
59
|
"tsd": "^0.33.0"
|
|
60
60
|
},
|
|
61
61
|
"files": [
|
|
62
62
|
"src",
|
|
63
|
-
"NEWS.md"
|
|
64
|
-
"exported.js",
|
|
65
|
-
"exported.d.ts"
|
|
63
|
+
"NEWS.md"
|
|
66
64
|
],
|
|
67
65
|
"ava": {
|
|
68
66
|
"files": [
|
|
@@ -79,5 +77,5 @@
|
|
|
79
77
|
"typeCoverage": {
|
|
80
78
|
"atLeast": 92.99
|
|
81
79
|
},
|
|
82
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "bd79330f78dae2faf9cc3d8b10063567700da07b"
|
|
83
81
|
}
|
package/src/amountMath.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export namespace AmountMath {
|
|
|
30
30
|
export function min<A extends Amount>(x: A, y: A, brand?: Brand): A;
|
|
31
31
|
export function max<A extends Amount>(x: A, y: A, brand?: Brand): A;
|
|
32
32
|
}
|
|
33
|
-
export function getAssetKind(amount: Amount): "copySet" | "
|
|
33
|
+
export function getAssetKind(amount: Amount): "copySet" | "set" | "copyBag" | "nat";
|
|
34
34
|
import type { AmountValue } from './types.js';
|
|
35
35
|
import type { MathHelpers } from './types.js';
|
|
36
36
|
import type { Brand } from './types.js';
|
package/src/amountMath.d.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,KAAK,GACH,CAAC,CAO8B;IAUvC,oBANiB,CAAC,SAAV,MAAQ,KACV,CAAC,KACD,CAAC,UACD,KAAK,GACH,CAAC,CAO8B;;AAKvC,qCADK,MAAM,yCAKjB;iCA7XoJ,YAAY;iCAAZ,YAAY;2BAAZ,YAAY;8BAAZ,YAAY;6BAD9H,gBAAgB;6BAAhB,gBAAgB;8BACkG,YAAY;+BAAZ,YAAY;mCAAZ,YAAY;mCAAZ,YAAY;+BAAZ,YAAY;4BAAZ,YAAY;AA4JjK;;;;;;;;;;;;GAYG;AACH,uBANyB,CAAC,SAAZ,SAAU,cACb,OAAO,CAAC,CAAC,eACT,OAAO,CAAC,CAAC,UACT,MAAM,CAAC,CAAC,GACN,OAAO,CAKnB"}
|
package/src/amountMath.js
CHANGED
|
@@ -362,7 +362,6 @@ export const AmountMath = {
|
|
|
362
362
|
* @returns {A}
|
|
363
363
|
*/
|
|
364
364
|
min: (x, y, brand = undefined) =>
|
|
365
|
-
// eslint-disable-next-line no-nested-ternary
|
|
366
365
|
isGTE(x, y, brand)
|
|
367
366
|
? y
|
|
368
367
|
: isGTE(y, x, brand)
|
|
@@ -378,7 +377,6 @@ export const AmountMath = {
|
|
|
378
377
|
* @returns {A}
|
|
379
378
|
*/
|
|
380
379
|
max: (x, y, brand = undefined) =>
|
|
381
|
-
// eslint-disable-next-line no-nested-ternary
|
|
382
380
|
isGTE(x, y, brand)
|
|
383
381
|
? x
|
|
384
382
|
: isGTE(y, x)
|
package/src/displayInfo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayInfo.d.ts","sourceRoot":"","sources":["displayInfo.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"displayInfo.d.ts","sourceRoot":"","sources":["displayInfo.js"],"names":[],"mappings":"AAYO,sDAJI,qBAAqB,aACrB,SAAS,GACP,WAAW,CAiBvB;2CAtBgE,YAAY;+BAAZ,YAAY;iCAAZ,YAAY"}
|
package/src/displayInfo.js
CHANGED
package/src/index.js
CHANGED
package/src/issuerKit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuerKit.d.ts","sourceRoot":"","sources":["issuerKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issuerKit.d.ts","sourceRoot":"","sources":["issuerKit.js"],"names":[],"mappings":"AAgHO,iCAbkB,CAAC,SAAZ,SAAU,iBACb,OAAO,2BACP,mBAAmB,uBAOnB,kBAAkB,GAEhB,UAAU,CAAC,CAAC,CA4BxB;AAQM,mCAFI,OAAO,WAE2C;AAoDtD,qCA1BkB,CAAC,SAAZ,SAAU,iBAYb,OAAO,QACP,MAAM,cACN,CAAC,gBACD,qBAAqB,2BACrB,mBAAmB,yCAOnB,mBAAmB,GACjB,UAAU,CAAC,CAAC,CA2BxB;AAoCM,iCA7B4B,CAAC,SAAtB,mBAAoB,EACT,CAAC,SAAZ,SAAU,iBAYb,OAAO,QACP,MAAM,cACN,CAAC,gBACD,qBAAqB,2BACrB,mBAAmB,YAOnB,CAAC,GACC,CAAC,CAAC,cAAc,CAAC,SAAS,aAAa,MAAM,CAAC,SAAS,GAAG,CAAC,GAC/D,UAAU,CAAC,EAAE,CAAC,CAAC,GACf,UAAU,CAAC,CAAC,CAyCpB;AAqCM,8BAzBmB,CAAC,SAAb,SAAU,UACY,CAAC,SAAvB,mBAAoB,aACvB,MAAM,cAMN,CAAC,gBAGD,qBAAqB,2BAErB,mBAAmB,yCAOnB,CAAC,GACC,CAAC,CAAC,cAAc,CAAC,SAAS,aAAa,MAAM,CAAC,SAAS,GAAG,CAAC,GAC/D,UAAU,CAAC,EAAE,CAAC,CAAC,GACf,UAAU,CAAC,CAAC,CAmBlB;yBA7UsB,CAAC,SAAZ,SAAU;UAEV,MAAM;eACN,CAAC;iBACD,qBAAqB;kBACrB,OAAO;;;;;;;;;;;;;;;;kCA0IR,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC;0BAhKsC,iBAAiB;6BASlC,kBAAkB;yCAFN,sBAAsB;wCAG0B,YAAY;+BAAZ,YAAY;2CAAZ,YAAY;yBALnE,gBAAgB;kCAGhB,kBAAkB;6BAHlB,gBAAgB"}
|
package/src/issuerKit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-payment-helpers.d.ts","sourceRoot":"","sources":["legacy-payment-helpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legacy-payment-helpers.d.ts","sourceRoot":"","sources":["legacy-payment-helpers.js"],"names":[],"mappings":"AAiCO,sBAPkB,CAAC,SAAb,SAAW,EACL,CAAC,SAAP,GAAK,iBACP,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,eACjB,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,mBACnB,OAAO,GACL,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAWlC;AAkBM,wBAPkB,CAAC,SAAb,SAAW,EACL,CAAC,SAAP,GAAK,iBACP,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,iBACjB,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,mBACrB,OAAO,GACL,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CA8BlC;AAgBM,sBANkB,CAAC,SAAb,SAAW,iBACb,KAAK,MAAM,CAAC,CAAC,CAAC,eACd,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAChB,OAAO,CAAC,CAAC,GACP,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAYjC;AAgBM,0BANkB,CAAC,SAAb,SAAW,iBACb,KAAK,MAAM,CAAC,CAAC,CAAC,eACd,KAAK,QAAQ,CAAC,CAAC,CAAC,WAChB,OAAO,CAAC,CAAC,EAAE,GACT,OAAO,CAAC,OAAO,EAAE,CAAC,CAoB9B;+BA5ImD,YAAY;yBADjC,gBAAgB;2BACK,YAAY;0BAFzC,WAAW;6BAEkB,YAAY;6BADjC,gBAAgB;4BACK,YAAY"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/** @type {MathHelpers<
|
|
2
|
-
export const copyBagMathHelpers: MathHelpers<
|
|
1
|
+
/** @type {MathHelpers<CopyBag>} */
|
|
2
|
+
export const copyBagMathHelpers: MathHelpers<CopyBag>;
|
|
3
|
+
import type { CopyBag } from '@endo/patterns';
|
|
3
4
|
import type { MathHelpers } from '../types.js';
|
|
4
5
|
//# sourceMappingURL=copyBagMathHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyBagMathHelpers.d.ts","sourceRoot":"","sources":["copyBagMathHelpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copyBagMathHelpers.d.ts","sourceRoot":"","sources":["copyBagMathHelpers.js"],"names":[],"mappings":"AAmBA,mCAAmC;AACnC,iCADW,YAAY,OAAO,CAAC,CAY5B;6BAlBuB,gBAAgB;iCADZ,aAAa"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
keyEQ,
|
|
5
3
|
makeCopyBag,
|
|
@@ -11,12 +9,15 @@ import {
|
|
|
11
9
|
bagDisjointSubtract,
|
|
12
10
|
} from '@agoric/store';
|
|
13
11
|
|
|
14
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @import {MathHelpers} from '../types.js'
|
|
14
|
+
* @import {CopyBag} from '@endo/patterns';
|
|
15
|
+
*/
|
|
15
16
|
|
|
16
|
-
/** @type {
|
|
17
|
+
/** @type {CopyBag} */
|
|
17
18
|
const empty = makeCopyBag([]);
|
|
18
19
|
|
|
19
|
-
/** @type {MathHelpers<
|
|
20
|
+
/** @type {MathHelpers<CopyBag>} */
|
|
20
21
|
export const copyBagMathHelpers = harden({
|
|
21
22
|
doCoerce: bag => {
|
|
22
23
|
mustMatch(bag, M.bag(), 'bag of amount');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copySetMathHelpers.d.ts","sourceRoot":"","sources":["copySetMathHelpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copySetMathHelpers.d.ts","sourceRoot":"","sources":["copySetMathHelpers.js"],"names":[],"mappings":"AAmBA,mCAAmC;AACnC,iCADW,YAAY,OAAO,CAAC,CAY5B;6BAlBuB,gBAAgB;iCADZ,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"natMathHelpers.d.ts","sourceRoot":"","sources":["natMathHelpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"natMathHelpers.d.ts","sourceRoot":"","sources":["natMathHelpers.js"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,6BAFU,YAAY,QAAQ,CAAC,CAgB5B;8BA7BsC,aAAa;iCAAb,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setMathHelpers.d.ts","sourceRoot":"","sources":["setMathHelpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setMathHelpers.d.ts","sourceRoot":"","sources":["setMathHelpers.js"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,6BAFU,YAAY,QAAQ,CAAC,CAkB5B;8BA3BsC,aAAa;iCAAb,aAAa"}
|
package/src/payment.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export function preparePaymentKind<K extends AssetKind>(issuerZone:
|
|
1
|
+
export function preparePaymentKind<K extends AssetKind>(issuerZone: Zone, name: string, brand: Brand<K>, PaymentI: InterfaceGuard<any>): () => Payment<K, any>;
|
|
2
2
|
import type { AssetKind } from './types.js';
|
|
3
|
+
import type { Zone } from '@agoric/zone';
|
|
3
4
|
import type { Brand } from './types.js';
|
|
5
|
+
import type { InterfaceGuard } from '@endo/patterns';
|
|
4
6
|
import type { Payment } from './types.js';
|
|
5
7
|
//# sourceMappingURL=payment.d.ts.map
|
package/src/payment.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["payment.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["payment.js"],"names":[],"mappings":"AAiBO,mCAPkB,CAAC,SAAb,SAAW,cACb,IAAI,QACJ,MAAM,SACN,MAAM,CAAC,CAAC,YACR,eAAe,GAAG,CAAC,GACjB,MAAM,QAAQ,CAAC,EAAE,GAAG,CAAC,CAejC;+BA3B2C,YAAY;0BACjC,cAAc;2BADO,YAAY;oCAEvB,gBAAgB;6BAFL,YAAY"}
|
package/src/payment.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { initEmpty } from '@agoric/store';
|
|
4
2
|
|
|
5
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @import {AssetKind, Brand, Payment} from './types.js'
|
|
5
|
+
* @import {Zone} from '@agoric/zone';
|
|
6
|
+
* @import {InterfaceGuard} from '@endo/patterns';
|
|
7
|
+
*/
|
|
6
8
|
|
|
7
9
|
// TODO Type InterfaceGuard better than InterfaceGuard<any>
|
|
8
10
|
/**
|
|
9
11
|
* @template {AssetKind} K
|
|
10
|
-
* @param {
|
|
12
|
+
* @param {Zone} issuerZone
|
|
11
13
|
* @param {string} name
|
|
12
14
|
* @param {Brand<K>} brand
|
|
13
|
-
* @param {
|
|
15
|
+
* @param {InterfaceGuard<any>} PaymentI
|
|
14
16
|
* @returns {() => Payment<K, any>}
|
|
15
17
|
*/
|
|
16
18
|
export const preparePaymentKind = (issuerZone, name, brand, PaymentI) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentLedger.d.ts","sourceRoot":"","sources":["paymentLedger.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paymentLedger.d.ts","sourceRoot":"","sources":["paymentLedger.js"],"names":[],"mappings":"AAqFO,qCAVkB,CAAC,SAAb,SAAW,cACb,IAAI,QACJ,MAAM,aACN,CAAC,eACD,YAAY,CAAC,CAAC,gBACd,OAAO,qBACP,kBAAkB,2BAClB,mBAAmB,GACjB,cAAc,CAAC,CAAC,CAyT5B;+BA9XwH,YAAY;0BAJ9G,mBAAmB;iCAI+E,YAAY;6BALtG,gBAAgB;wCAK0E,YAAY;yCAF/F,sBAAsB;mCAE6D,YAAY"}
|
package/src/paymentLedger.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
|
-
/// <reference types="@agoric/store/exported.js" />
|
|
4
|
-
|
|
5
1
|
import { q, Fail, annotateError, X } from '@endo/errors';
|
|
6
2
|
import { isPromise } from '@endo/promise-kit';
|
|
7
3
|
import { mustMatch, M, keyEQ } from '@endo/patterns';
|
|
@@ -17,6 +13,8 @@ import { BrandI, makeIssuerInterfaces } from './typeGuards.js';
|
|
|
17
13
|
* @import {ShutdownWithFailure} from '@agoric/swingset-vat';
|
|
18
14
|
* @import {AmountStore} from './amountStore.js';
|
|
19
15
|
* @import {Amount, AssetKind, DisplayInfo, PaymentLedger, Payment, Brand, RecoverySetsOption, Purse, Issuer, Mint} from './types.js';
|
|
16
|
+
* @import {WeakMapStore} from '@agoric/store';
|
|
17
|
+
* @import {SetStore} from '@agoric/store';
|
|
20
18
|
*/
|
|
21
19
|
|
|
22
20
|
/**
|
package/src/purse.d.ts
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
export function preparePurseKind(issuerZone:
|
|
2
|
-
purse:
|
|
3
|
-
depositFacet:
|
|
1
|
+
export function preparePurseKind(issuerZone: Zone, name: string, assetKind: AssetKind, brand: Brand, PurseIKit: {
|
|
2
|
+
purse: InterfaceGuard<any>;
|
|
3
|
+
depositFacet: InterfaceGuard<any>;
|
|
4
4
|
}, purseMethods: {
|
|
5
5
|
depositInternal: any;
|
|
6
6
|
withdrawInternal: any;
|
|
7
7
|
}, recoverySetsState: RecoverySetsOption, paymentRecoverySets: WeakMapStore<Payment, SetStore<Payment>>): () => import("@endo/exo").Guarded<{
|
|
8
8
|
deposit(srcPayment: any, optAmountShape?: undefined): any;
|
|
9
9
|
withdraw(amount: any): any;
|
|
10
|
-
getCurrentAmount(): import("./types.js").NatAmount | import("./types.js").CopySetAmount<import("@endo/patterns").Key> | import("./types.js").
|
|
10
|
+
getCurrentAmount(): import("./types.js").NatAmount | import("./types.js").CopySetAmount<import("@endo/patterns").Key> | import("./types.js").SetAmount<import("@endo/patterns").Key> | import("./types.js").CopyBagAmount<import("@endo/patterns").Key>;
|
|
11
11
|
getCurrentAmountNotifier(): import("@agoric/notifier").Notifier<any>;
|
|
12
12
|
getAllegedBrand(): Brand;
|
|
13
13
|
getDepositFacet(): import("@endo/exo").Guarded<{
|
|
14
14
|
receive(...args: any[]): any;
|
|
15
15
|
}>;
|
|
16
16
|
getRecoverySet(): import("@endo/patterns").CopySet<any>;
|
|
17
|
-
recoverAll(): import("./types.js").NatAmount | import("./types.js").CopySetAmount<import("@endo/patterns").Key> | import("./types.js").
|
|
17
|
+
recoverAll(): import("./types.js").NatAmount | import("./types.js").CopySetAmount<import("@endo/patterns").Key> | import("./types.js").SetAmount<import("@endo/patterns").Key> | import("./types.js").CopyBagAmount<import("@endo/patterns").Key>;
|
|
18
18
|
}>;
|
|
19
|
+
import type { Zone } from '@agoric/zone';
|
|
19
20
|
import type { AssetKind } from './types.js';
|
|
20
21
|
import type { Brand } from './types.js';
|
|
22
|
+
import type { InterfaceGuard } from '@endo/patterns';
|
|
21
23
|
import type { RecoverySetsOption } from './types.js';
|
|
22
24
|
import type { Payment } from './types.js';
|
|
25
|
+
import type { SetStore } from '@agoric/store';
|
|
26
|
+
import type { WeakMapStore } from '@agoric/store';
|
|
23
27
|
//# sourceMappingURL=purse.d.ts.map
|
package/src/purse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purse.d.ts","sourceRoot":"","sources":["purse.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"purse.d.ts","sourceRoot":"","sources":["purse.js"],"names":[],"mappings":"AAiCO,6CAfI,IAAI,QACJ,MAAM,aACN,SAAS,SACT,KAAK,aACL;IACN,KAAK,EAAE,eAAe,GAAG,CAAC,CAAC;IAC3B,YAAY,EAAE,eAAe,GAAG,CAAC,CAAC;CACnC,gBACO;IACN,eAAe,EAAE,GAAG,CAAC;IACrB,gBAAgB,EAAE,GAAG,CAAC;CACvB,qBACO,kBAAkB,uBAClB,aAAa,OAAO,EAAE,SAAS,OAAO,CAAC,CAAC;;;;;;;;;;;GA4JlD;0BAnLsB,cAAc;+BAD2B,YAAY;2BAAZ,YAAY;oCAE3C,gBAAgB;wCAFe,YAAY;6BAAZ,YAAY;8BAIjD,eAAe;kCADX,eAAe"}
|
package/src/purse.js
CHANGED
|
@@ -4,19 +4,25 @@ import { AmountMath } from './amountMath.js';
|
|
|
4
4
|
import { makeTransientNotifierKit } from './transientNotifier.js';
|
|
5
5
|
import { makeAmountStore } from './amountStore.js';
|
|
6
6
|
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @import {AssetKind, RecoverySetsOption, Brand, Payment} from './types.js'
|
|
9
|
+
* @import {Zone} from '@agoric/zone';
|
|
10
|
+
* @import {InterfaceGuard} from '@endo/patterns';
|
|
11
|
+
* @import {WeakMapStore} from '@agoric/store';
|
|
12
|
+
* @import {SetStore} from '@agoric/store';
|
|
13
|
+
*/
|
|
8
14
|
|
|
9
15
|
const EMPTY_COPY_SET = makeCopySet([]);
|
|
10
16
|
|
|
11
17
|
// TODO Type InterfaceGuard better than InterfaceGuard<any>
|
|
12
18
|
/**
|
|
13
|
-
* @param {
|
|
19
|
+
* @param {Zone} issuerZone
|
|
14
20
|
* @param {string} name
|
|
15
21
|
* @param {AssetKind} assetKind
|
|
16
22
|
* @param {Brand} brand
|
|
17
23
|
* @param {{
|
|
18
|
-
* purse:
|
|
19
|
-
* depositFacet:
|
|
24
|
+
* purse: InterfaceGuard<any>;
|
|
25
|
+
* depositFacet: InterfaceGuard<any>;
|
|
20
26
|
* }} PurseIKit
|
|
21
27
|
* @param {{
|
|
22
28
|
* depositInternal: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transientNotifier.d.ts","sourceRoot":"","sources":["transientNotifier.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transientNotifier.d.ts","sourceRoot":"","sources":["transientNotifier.js"],"names":[],"mappings":"AAYO;;;EAoBN"}
|
package/src/transientNotifier.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { makeScalarBigWeakMapStore } from '@agoric/vat-data';
|
|
4
2
|
import { provideLazy } from '@agoric/store';
|
|
5
3
|
import { makeNotifierKit } from '@agoric/notifier';
|
|
@@ -7,6 +5,7 @@ import { makeNotifierKit } from '@agoric/notifier';
|
|
|
7
5
|
/**
|
|
8
6
|
* @import {Purse} from './types.js';
|
|
9
7
|
* @import {NotifierRecord} from '@agoric/notifier';
|
|
8
|
+
* @import {WeakMapStore} from '@agoric/store';
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
// Note: Virtual for high cardinality, but *not* durable, and so
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @import {AmountValue, Ratio} from './types.js'
|
|
3
3
|
* @import {TypedPattern} from '@agoric/internal'
|
|
4
4
|
* @import {CopyBag, CopySet, Pattern} from '@endo/patterns';
|
|
5
|
+
* @import {NatValue, SetValue} from './types.js';
|
|
5
6
|
*/
|
|
6
7
|
export const BrandShape: import("@endo/patterns").Matcher;
|
|
7
8
|
export const IssuerShape: import("@endo/patterns").Matcher;
|
|
@@ -28,7 +29,7 @@ export namespace AmountShape {
|
|
|
28
29
|
export const AmountPatternShape: import("@endo/patterns").Matcher;
|
|
29
30
|
/** @type {TypedPattern<Ratio>} */
|
|
30
31
|
export const RatioShape: TypedPattern<Ratio>;
|
|
31
|
-
export function isNatValue(value: AmountValue): value is
|
|
32
|
+
export function isNatValue(value: AmountValue): value is NatValue;
|
|
32
33
|
export function isCopySetValue(value: AmountValue): value is CopySet;
|
|
33
34
|
export function isSetValue(value: AmountValue): value is SetValue;
|
|
34
35
|
export function isCopyBagValue(value: AmountValue): value is CopyBag;
|
|
@@ -86,7 +87,9 @@ declare const AmountValueShape: import("@endo/patterns").Matcher;
|
|
|
86
87
|
import type { Ratio } from './types.js';
|
|
87
88
|
import type { TypedPattern } from '@agoric/internal';
|
|
88
89
|
import type { AmountValue } from './types.js';
|
|
90
|
+
import type { NatValue } from './types.js';
|
|
89
91
|
import type { CopySet } from '@endo/patterns';
|
|
92
|
+
import type { SetValue } from './types.js';
|
|
90
93
|
import type { CopyBag } from '@endo/patterns';
|
|
91
94
|
import type { Pattern } from '@endo/patterns';
|
|
92
95
|
export {};
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,0DAA+C;AAC/C,2DAAiD;AACjD,4DAAmD;AACnD,0DAA+C;AAC/C,iEAA6D;AAC7D,6DAAqD;AACrD,yDAA6C;;;;;AAkE7C;;;;;;;;;;GAUG;AACH,kEAA8C;AAE9C,kCAAkC;AAClC,yBADW,aAAa,KAAK,CAAC,CACiD;AASxE,kCAHI,WAAW,GACT,KAAK,IAAI,QAAQ,CAEkC;AASzD,sCAHI,WAAW,GACT,KAAK,IAAI,OAAO,CAE2C;AAYjE,kCAHI,WAAW,GACT,KAAK,IAAI,QAAQ,CAEkC;AASzD,sCAHI,WAAW,GACT,KAAK,IAAI,OAAO,CAE2C;AAIxE,0CAA2C,GAAG,CAAC;AAE/C,8DAAuE;AAEvE,gEAaE;;;;;;;;AAaF;;;;;GAKG;AAOI,kDAJI,OAAO,mBACP,OAAO,gBACP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqEjB;AAhLD,iEAKE;2BAzEmC,YAAY;kCAClB,kBAAkB;iCADZ,YAAY;8BAGZ,YAAY;6BADL,gBAAgB;8BACvB,YAAY;6BADL,gBAAgB;6BAAhB,gBAAgB"}
|
package/src/typeGuards.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// @jessie-check
|
|
2
|
-
|
|
3
1
|
import { M, matches, getInterfaceGuardPayload } from '@endo/patterns';
|
|
4
2
|
/**
|
|
5
3
|
* @import {AmountValue, Ratio} from './types.js'
|
|
6
4
|
* @import {TypedPattern} from '@agoric/internal'
|
|
7
5
|
* @import {CopyBag, CopySet, Pattern} from '@endo/patterns';
|
|
6
|
+
* @import {NatValue, SetValue} from './types.js';
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export const BrandShape = M.remotable('Brand');
|
|
@@ -100,7 +99,7 @@ harden(RatioShape);
|
|
|
100
99
|
* Returns true if value is a Nat bigint.
|
|
101
100
|
*
|
|
102
101
|
* @param {AmountValue} value
|
|
103
|
-
* @returns {value is
|
|
102
|
+
* @returns {value is NatValue}
|
|
104
103
|
*/
|
|
105
104
|
export const isNatValue = value => matches(value, NatValueShape);
|
|
106
105
|
harden(isNatValue);
|