@agoric/portfolio-api 0.1.1-dev-b2ca951.0.b2ca951 → 0.1.1-dev-c4547d6.0.c4547d6
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 +4 -4
- package/src/type-guards.d.ts +7 -1
- package/src/type-guards.d.ts.map +1 -1
- package/src/type-guards.js +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/portfolio-api",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-c4547d6.0.c4547d6",
|
|
4
4
|
"description": "API for Portfolio management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"generate:ymax-machine": "npx tsx scripts/gen-ymax-machine.mts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/internal": "0.3.3-dev-
|
|
31
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
30
|
+
"@agoric/internal": "0.3.3-dev-c4547d6.0.c4547d6",
|
|
31
|
+
"@agoric/orchestration": "0.1.1-dev-c4547d6.0.c4547d6",
|
|
32
32
|
"@endo/common": "^1.2.13",
|
|
33
33
|
"@endo/errors": "^1.2.13",
|
|
34
34
|
"@endo/patterns": "^1.7.0"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": "^20.9 || ^22.11"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "c4547d6ea97c89493c3547ce519fb6a9e2ab4538"
|
|
73
73
|
}
|
package/src/type-guards.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BeefyInstrumentId, ERC4626InstrumentId } from '@aglocal/portfolio-contract/src/type-guards.js';
|
|
1
2
|
import type { InstrumentId } from './instruments.js';
|
|
2
3
|
import type { DepositFromChainRef, LocalChainAccountRef, InterChainAccountRef, WithdrawToChainRef } from './types.js';
|
|
3
4
|
/**
|
|
@@ -29,5 +30,10 @@ export declare const isWithdrawToChainRef: (ref: string) => ref is WithdrawToCha
|
|
|
29
30
|
* Is the input an ERC-4626 InstrumentId
|
|
30
31
|
* (i.e., does it start with 'ERC4626_')?
|
|
31
32
|
*/
|
|
32
|
-
export declare const isERC4626InstrumentId: (ref: string) =>
|
|
33
|
+
export declare const isERC4626InstrumentId: (ref: string) => ref is ERC4626InstrumentId;
|
|
34
|
+
/**
|
|
35
|
+
* Is the input an Beefy InstrumentId
|
|
36
|
+
* (i.e., does it start with 'Beefy_')?
|
|
37
|
+
*/
|
|
38
|
+
export declare const isBeefyInstrumentId: (ref: string) => ref is BeefyInstrumentId;
|
|
33
39
|
//# sourceMappingURL=type-guards.d.ts.map
|
package/src/type-guards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["type-guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,MAAM,KACV,GAAG,IAAI,mBAA0C,CAAC;AAGrD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,GAAG,IAAI,oBAA2C,CAAC;AAGtD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,GAAG,IAAI,oBAA2C,CAAC;AAGtD;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,YAC5B,CAAC;AAGzB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,kBACrC,CAAC;AAGtB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["type-guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,MAAM,KACV,GAAG,IAAI,mBAA0C,CAAC;AAGrD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,GAAG,IAAI,oBAA2C,CAAC;AAGtD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,GAAG,IAAI,oBAA2C,CAAC;AAGtD;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,YAC5B,CAAC;AAGzB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,kBACrC,CAAC;AAGtB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,MAAM,KACV,GAAG,IAAI,mBAAiD,CAAC;AAG5D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,iBAC/B,CAAC"}
|
package/src/type-guards.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
1
5
|
|
|
2
6
|
|
|
3
7
|
|
|
@@ -53,6 +57,15 @@ harden(isWithdrawToChainRef);
|
|
|
53
57
|
* Is the input an ERC-4626 InstrumentId
|
|
54
58
|
* (i.e., does it start with 'ERC4626_')?
|
|
55
59
|
*/
|
|
56
|
-
export const isERC4626InstrumentId = (
|
|
57
|
-
ref
|
|
60
|
+
export const isERC4626InstrumentId = (
|
|
61
|
+
ref ,
|
|
62
|
+
) => ref.startsWith('ERC4626_');
|
|
58
63
|
harden(isERC4626InstrumentId);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Is the input an Beefy InstrumentId
|
|
67
|
+
* (i.e., does it start with 'Beefy_')?
|
|
68
|
+
*/
|
|
69
|
+
export const isBeefyInstrumentId = (ref ) =>
|
|
70
|
+
ref.startsWith('Beefy_');
|
|
71
|
+
harden(isBeefyInstrumentId);
|