@agoric/portfolio-api 0.1.1-dev-e87ca23.0.e87ca23 → 0.1.1-dev-a06b4b8.0.a06b4b8
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/constants.d.ts +34 -28
- package/src/constants.d.ts.map +1 -1
- package/src/constants.js +14 -13
- package/src/resolver.d.ts +20 -9
- package/src/resolver.d.ts.map +1 -1
- package/src/resolver.js +11 -8
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-a06b4b8.0.a06b4b8",
|
|
4
4
|
"description": "API for Portfolio management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"generate:ymax-machine": "npx tsx scripts/gen-ymax-machine.mts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/
|
|
30
|
+
"@agoric/internal": "0.3.3-dev-a06b4b8.0.a06b4b8",
|
|
31
|
+
"@agoric/orchestration": "0.1.1-dev-a06b4b8.0.a06b4b8",
|
|
31
32
|
"@endo/common": "^1.2.13",
|
|
32
33
|
"@endo/patterns": "^1.7.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@agoric/internal": "0.3.3-dev-e87ca23.0.e87ca23",
|
|
36
36
|
"@types/js-yaml": "^4",
|
|
37
37
|
"ajv": "^6.12.6",
|
|
38
38
|
"ava": "^5.3.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": "^20.9 || ^22.11"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "a06b4b8c33322b656fc99ae95610c55639a15375"
|
|
69
69
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -16,13 +16,18 @@ export const DEFAULT_FLOW_CONFIG: FlowConfig | undefined;
|
|
|
16
16
|
* Yield protocols for Proof of Concept.
|
|
17
17
|
*/
|
|
18
18
|
export type YieldProtocol = (typeof YieldProtocol)[keyof typeof YieldProtocol];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Yield protocols for Proof of Concept.
|
|
21
|
+
*
|
|
22
|
+
* @enum {(typeof YieldProtocol)[keyof typeof YieldProtocol]}
|
|
23
|
+
*/
|
|
24
|
+
export const YieldProtocol: import("@agoric/internal").KeyMirrorResult<{
|
|
25
|
+
Aave: null;
|
|
26
|
+
Compound: null;
|
|
27
|
+
USDN: null;
|
|
28
|
+
Beefy: null;
|
|
29
|
+
ERC4626: null;
|
|
30
|
+
}>;
|
|
26
31
|
/**
|
|
27
32
|
* EVM chain wallet operations that incur different gas costs.
|
|
28
33
|
* Supply: user is supplying assets to a yield protocol on the target chain.
|
|
@@ -36,13 +41,16 @@ export namespace EvmWalletOperationType {
|
|
|
36
41
|
let DepositForBurn: "depositforburn";
|
|
37
42
|
}
|
|
38
43
|
export type AxelarChain = (typeof AxelarChain)[keyof typeof AxelarChain];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @enum {(typeof AxelarChain)[keyof typeof AxelarChain]}
|
|
46
|
+
*/
|
|
47
|
+
export const AxelarChain: import("@agoric/internal").KeyMirrorResult<{
|
|
48
|
+
Arbitrum: null;
|
|
49
|
+
Avalanche: null;
|
|
50
|
+
Base: null;
|
|
51
|
+
Ethereum: null;
|
|
52
|
+
Optimism: null;
|
|
53
|
+
}>;
|
|
46
54
|
/**
|
|
47
55
|
* cf. https://chainlist.org/
|
|
48
56
|
* XXX this probably belongs in @agoric/orchestration
|
|
@@ -50,20 +58,18 @@ export namespace AxelarChain {
|
|
|
50
58
|
*/
|
|
51
59
|
export const Eip155ChainIds: Readonly<Record<ClusterName, Readonly<Partial<Record<AxelarChain, bigint>>>>>;
|
|
52
60
|
export type SupportedChain = (typeof SupportedChain)[keyof typeof SupportedChain];
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export let noble: "noble";
|
|
66
|
-
}
|
|
61
|
+
/**
|
|
62
|
+
* @enum {(typeof SupportedChain)[keyof typeof SupportedChain]}
|
|
63
|
+
*/
|
|
64
|
+
export const SupportedChain: import("@agoric/internal").KeyMirrorResult<{
|
|
65
|
+
Arbitrum: "Arbitrum";
|
|
66
|
+
Avalanche: "Avalanche";
|
|
67
|
+
Base: "Base";
|
|
68
|
+
Ethereum: "Ethereum";
|
|
69
|
+
Optimism: "Optimism";
|
|
70
|
+
agoric: "agoric";
|
|
71
|
+
noble: "noble";
|
|
72
|
+
}>;
|
|
67
73
|
/**
|
|
68
74
|
* cf. https://chainagnostic.org/CAIPs/caip-2
|
|
69
75
|
* Please keep in sync with ../../../services/ymax-planner/src/support.ts `spectrumChainIds`
|
package/src/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["constants.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["constants.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,kCAFU,UAAU,GAAG,SAAS,CAO9B;;;;4BAMQ,CAAC,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC;AAH5D;;;;GAIG;AACH;;;;;;GAMG;;;;;;;qCASO,CAAC,OAAO,sBAAsB,EAAE,MAAM,OAAO,sBAAsB,CAAC;;;;;;0BAUpE,CAAC,OAAO,WAAW,EAAE,MAAM,OAAO,WAAW,CAAC;AADxD;;GAEG;AACH;;;;;;GAMG;AAGH;;;;GAIG;AACH,6BAFU,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAkBrF;6BAIQ,CAAC,OAAO,cAAc,EAAE,MAAM,OAAO,cAAc,CAAC;AAD9D;;GAEG;AACH;;;;;;;;GAWG;AAMH;;;;;;;GAOG;AACH,2BAFU,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAgB7F;AAGF;;;;GAIG;AACH,2BAFU,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAwBxF;;;;gCAMQ,CAAC,OAAO,iBAAiB,EAAE,MAAM,OAAO,iBAAiB,CAAC;;;;;AAgBpE;;;GAGG;AACH,mCAAoC,IAAI,CAAC;AAEzC;;;GAGG;AACH,gCAFU,aAAa,UAAU,CAAC,UAAU,CAAC,CAAC,CAO5C;AAEF;;;GAGG;AACH,8BAFU,aAAa,UAAU,CAAC,CAOhC;gCA5M2B,YAAY;iCAFG,kBAAkB;iCAChC,uBAAuB;kCADT,kBAAkB"}
|
package/src/constants.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/// <reference types="ses" />
|
|
4
4
|
|
|
5
|
+
import { keyMirror } from '@agoric/internal';
|
|
5
6
|
import { M, objectMap } from '@endo/patterns';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -31,12 +32,12 @@ harden(DEFAULT_FLOW_CONFIG);
|
|
|
31
32
|
*
|
|
32
33
|
* @enum {(typeof YieldProtocol)[keyof typeof YieldProtocol]}
|
|
33
34
|
*/
|
|
34
|
-
export const YieldProtocol =
|
|
35
|
-
Aave:
|
|
36
|
-
Compound:
|
|
37
|
-
USDN:
|
|
38
|
-
Beefy:
|
|
39
|
-
ERC4626:
|
|
35
|
+
export const YieldProtocol = keyMirror({
|
|
36
|
+
Aave: null,
|
|
37
|
+
Compound: null,
|
|
38
|
+
USDN: null,
|
|
39
|
+
Beefy: null,
|
|
40
|
+
ERC4626: null,
|
|
40
41
|
});
|
|
41
42
|
harden(YieldProtocol);
|
|
42
43
|
|
|
@@ -58,12 +59,12 @@ harden(EvmWalletOperationType);
|
|
|
58
59
|
/**
|
|
59
60
|
* @enum {(typeof AxelarChain)[keyof typeof AxelarChain]}
|
|
60
61
|
*/
|
|
61
|
-
export const AxelarChain =
|
|
62
|
-
Arbitrum:
|
|
63
|
-
Avalanche:
|
|
64
|
-
Base:
|
|
65
|
-
Ethereum:
|
|
66
|
-
Optimism:
|
|
62
|
+
export const AxelarChain = keyMirror({
|
|
63
|
+
Arbitrum: null,
|
|
64
|
+
Avalanche: null,
|
|
65
|
+
Base: null,
|
|
66
|
+
Ethereum: null,
|
|
67
|
+
Optimism: null,
|
|
67
68
|
});
|
|
68
69
|
harden(AxelarChain);
|
|
69
70
|
|
|
@@ -94,7 +95,7 @@ harden(Eip155ChainIds);
|
|
|
94
95
|
/**
|
|
95
96
|
* @enum {(typeof SupportedChain)[keyof typeof SupportedChain]}
|
|
96
97
|
*/
|
|
97
|
-
export const SupportedChain =
|
|
98
|
+
export const SupportedChain = keyMirror({
|
|
98
99
|
// ...AxelarChain works locally but gets lost in .d.ts generation
|
|
99
100
|
Arbitrum: 'Arbitrum',
|
|
100
101
|
Avalanche: 'Avalanche',
|
package/src/resolver.d.ts
CHANGED
|
@@ -14,15 +14,26 @@ export namespace TxStatus {
|
|
|
14
14
|
* Tx types for published transactions
|
|
15
15
|
*/
|
|
16
16
|
export type TxType = Readonly<(typeof TxType)[keyof typeof TxType]>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Tx types for published transactions
|
|
19
|
+
*
|
|
20
|
+
* @enum {Readonly<(typeof TxType)[keyof typeof TxType]>}
|
|
21
|
+
*/
|
|
22
|
+
export const TxType: import("@agoric/internal").KeyMirrorResult<{
|
|
23
|
+
CCTP_TO_EVM: null;
|
|
24
|
+
GMP: null;
|
|
25
|
+
CCTP_TO_AGORIC: null;
|
|
26
|
+
IBC_FROM_AGORIC: null;
|
|
27
|
+
IBC_FROM_REMOTE: null;
|
|
28
|
+
MAKE_ACCOUNT: null;
|
|
29
|
+
/**
|
|
30
|
+
* Placeholder for ProgressTracker protocols not yet recognized by the
|
|
31
|
+
* resolver, just so they can be published to vstorage, but not processed any
|
|
32
|
+
* further. If these appear, it means the resolver source code needs to be
|
|
33
|
+
* updated.
|
|
34
|
+
*/
|
|
35
|
+
UNKNOWN: null;
|
|
36
|
+
}>;
|
|
26
37
|
/**
|
|
27
38
|
* Represents a published transaction with its type, optional amount, destination, and status.
|
|
28
39
|
*/
|
package/src/resolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["resolver.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["resolver.js"],"names":[],"mappings":";;;;;uBAwBU,CAAC,OAAO,QAAQ,EAAE,MAAM,OAAO,QAAQ,CAAC;;;;;;;;;;qBAaxC,QAAQ,CAAC,CAAC,OAAO,MAAM,EAAE,MAAM,OAAO,MAAM,CAAC,CAAC;AAHxD;;;;GAIG;AAEH;;;;;;;IAOE;;;;;OAKG;;GAEF;;;;;;;;UA5CW,MAAM;;;;;;;;;;;;;;;;;;;;YAKN,QAAQ"}
|
package/src/resolver.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { keyMirror } from '@agoric/internal';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @import {AccountId} from '@agoric/orchestration';
|
|
3
5
|
*/
|
|
@@ -35,19 +37,20 @@ harden(TxStatus);
|
|
|
35
37
|
*
|
|
36
38
|
* @enum {Readonly<(typeof TxType)[keyof typeof TxType]>}
|
|
37
39
|
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
|
|
41
|
+
export const TxType = keyMirror({
|
|
42
|
+
CCTP_TO_EVM: null,
|
|
43
|
+
GMP: null,
|
|
44
|
+
CCTP_TO_AGORIC: null,
|
|
45
|
+
IBC_FROM_AGORIC: null,
|
|
46
|
+
IBC_FROM_REMOTE: null,
|
|
47
|
+
MAKE_ACCOUNT: null,
|
|
45
48
|
/**
|
|
46
49
|
* Placeholder for ProgressTracker protocols not yet recognized by the
|
|
47
50
|
* resolver, just so they can be published to vstorage, but not processed any
|
|
48
51
|
* further. If these appear, it means the resolver source code needs to be
|
|
49
52
|
* updated.
|
|
50
53
|
*/
|
|
51
|
-
UNKNOWN:
|
|
54
|
+
UNKNOWN: null,
|
|
52
55
|
});
|
|
53
56
|
harden(TxType);
|