@agoric/portfolio-api 0.1.1-dev-ff43ad7.0.ff43ad7 → 0.1.1-dev-aa6629d.0.aa6629d
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 +15 -0
- package/src/constants.d.ts.map +1 -1
- package/src/constants.js +21 -2
- package/src/resolver.d.ts +7 -4
- package/src/resolver.d.ts.map +1 -1
- package/src/resolver.js +12 -2
- package/src/types.d.ts +18 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +20 -0
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-aa6629d.0.aa6629d",
|
|
4
4
|
"description": "API for Portfolio management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"generate:ymax-machine": "npx tsx scripts/gen-ymax-machine.mts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
30
|
+
"@agoric/orchestration": "0.1.1-dev-aa6629d.0.aa6629d",
|
|
31
31
|
"@endo/common": "^1.2.13"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@agoric/internal": "0.3.3-dev-
|
|
34
|
+
"@agoric/internal": "0.3.3-dev-aa6629d.0.aa6629d",
|
|
35
35
|
"@types/js-yaml": "^4",
|
|
36
36
|
"ajv": "^6.12.6",
|
|
37
37
|
"ava": "^5.3.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": "^20.9 || ^22.11"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "aa6629dd5d80a450843e2916ff9507265610503f"
|
|
68
68
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {ClusterName} from '@agoric/internal';
|
|
3
|
+
* @import {CaipChainId} from '@agoric/orchestration';
|
|
4
|
+
* @import {FlowConfig} from './types.js';
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Configuration arguments for newly-created portfolio flows.
|
|
8
|
+
*
|
|
9
|
+
* This is only a default so that existing flows continue to behave as before
|
|
10
|
+
* for replay fidelity.
|
|
11
|
+
*
|
|
12
|
+
* @type {FlowConfig | undefined}
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_FLOW_CONFIG: FlowConfig | undefined;
|
|
1
15
|
/**
|
|
2
16
|
* Yield protocols for Proof of Concept.
|
|
3
17
|
*/
|
|
@@ -77,6 +91,7 @@ export namespace RebalanceStrategy {
|
|
|
77
91
|
* This corresponds to 100 uusdc, i.e., $0.0001 for USDC.
|
|
78
92
|
*/
|
|
79
93
|
export const ACCOUNT_DUST_EPSILON: 100n;
|
|
94
|
+
import type { FlowConfig } from './types.js';
|
|
80
95
|
import type { ClusterName } from '@agoric/internal';
|
|
81
96
|
import type { CaipChainId } from '@agoric/orchestration';
|
|
82
97
|
//# sourceMappingURL=constants.d.ts.map
|
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":"AAMA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,kCAFU,UAAU,GAAG,SAAS,CAO9B;;;;4BAMQ,CAAC,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC;;;;;;;;;;;;;qCAgBlD,CAAC,OAAO,sBAAsB,EAAE,MAAM,OAAO,sBAAsB,CAAC;;;;;;0BAUpE,CAAC,OAAO,WAAW,EAAE,MAAM,OAAO,WAAW,CAAC;;;;;;;;AAWxD;;;;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;;;;;;;;;;;;;;;AAmB9D;;;;;;;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;gCArLZ,YAAY;iCAFX,kBAAkB;iCAClB,uBAAuB"}
|
package/src/constants.js
CHANGED
|
@@ -4,8 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
import { objectMap } from '@endo/common/object-map.js';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @import {ClusterName} from '@agoric/internal';
|
|
9
|
+
* @import {CaipChainId} from '@agoric/orchestration';
|
|
10
|
+
* @import {FlowConfig} from './types.js';
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Configuration arguments for newly-created portfolio flows.
|
|
15
|
+
*
|
|
16
|
+
* This is only a default so that existing flows continue to behave as before
|
|
17
|
+
* for replay fidelity.
|
|
18
|
+
*
|
|
19
|
+
* @type {FlowConfig | undefined}
|
|
20
|
+
*/
|
|
21
|
+
export const DEFAULT_FLOW_CONFIG = {
|
|
22
|
+
features: {
|
|
23
|
+
/** Enable ProgressTracker support in new flows. */
|
|
24
|
+
useProgressTracker: true,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
harden(DEFAULT_FLOW_CONFIG);
|
|
9
28
|
|
|
10
29
|
/**
|
|
11
30
|
* Yield protocols for Proof of Concept.
|
package/src/resolver.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type TxStatus = (typeof TxStatus)[keyof typeof TxStatus];
|
|
7
7
|
export namespace TxStatus {
|
|
8
|
+
let SETUP: "setup";
|
|
8
9
|
let PENDING: "pending";
|
|
9
10
|
let SUCCESS: "success";
|
|
10
11
|
let FAILED: "failed";
|
|
@@ -12,12 +13,15 @@ export namespace TxStatus {
|
|
|
12
13
|
/**
|
|
13
14
|
* Tx types for published transactions
|
|
14
15
|
*/
|
|
15
|
-
export type TxType = (typeof TxType)[keyof typeof TxType]
|
|
16
|
+
export type TxType = Readonly<(typeof TxType)[keyof typeof TxType]>;
|
|
16
17
|
export namespace TxType {
|
|
17
18
|
let CCTP_TO_EVM: "CCTP_TO_EVM";
|
|
18
19
|
let GMP: "GMP";
|
|
19
20
|
let CCTP_TO_AGORIC: "CCTP_TO_AGORIC";
|
|
21
|
+
let IBC_FROM_AGORIC: "IBC_FROM_AGORIC";
|
|
22
|
+
let IBC_FROM_REMOTE: "IBC_FROM_REMOTE";
|
|
20
23
|
let MAKE_ACCOUNT: "MAKE_ACCOUNT";
|
|
24
|
+
let UNKNOWN: "UNKNOWN";
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* Represents a published transaction with its type, optional amount, destination, and status.
|
|
@@ -32,9 +36,9 @@ export type PublishedTx = {
|
|
|
32
36
|
*/
|
|
33
37
|
amount?: bigint | undefined;
|
|
34
38
|
/**
|
|
35
|
-
* - The destination account identifier for the transaction
|
|
39
|
+
* - The destination account identifier for the transaction
|
|
36
40
|
*/
|
|
37
|
-
destinationAddress
|
|
41
|
+
destinationAddress?: `${string}:${string}:${string}` | undefined;
|
|
38
42
|
/**
|
|
39
43
|
* - The expected smart wallet hex address to be created (for MAKE_ACCOUNT only, format: 0x...)
|
|
40
44
|
*/
|
|
@@ -48,5 +52,4 @@ export type PublishedTx = {
|
|
|
48
52
|
*/
|
|
49
53
|
rejectionReason?: string | undefined;
|
|
50
54
|
};
|
|
51
|
-
import type { AccountId } from '@agoric/orchestration';
|
|
52
55
|
//# sourceMappingURL=resolver.d.ts.map
|
package/src/resolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["resolver.js"],"names":[],"mappings":";;;;;uBAqBU,CAAC,OAAO,QAAQ,EAAE,MAAM,OAAO,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["resolver.js"],"names":[],"mappings":";;;;;uBAqBU,CAAC,OAAO,QAAQ,EAAE,MAAM,OAAO,QAAQ,CAAC;;;;;;;;;;qBAaxC,QAAQ,CAAC,CAAC,OAAO,MAAM,EAAE,MAAM,OAAO,MAAM,CAAC,CAAC;;;;;;;;;;;;;;;;;UA1B1C,MAAM;;;;;;;;;;;;;;;;YAIN,QAAQ"}
|
package/src/resolver.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @typedef {object} PublishedTx
|
|
9
9
|
* @property {TxType} type - The type of transaction (CCTP_TO_EVM, GMP, CCTP_TO_AGORIC, or MAKE_ACCOUNT)
|
|
10
10
|
* @property {bigint} [amount] - Optional transaction amount as a bigint
|
|
11
|
-
* @property {AccountId} destinationAddress - The destination account identifier for the transaction
|
|
11
|
+
* @property {AccountId} [destinationAddress] - The destination account identifier for the transaction
|
|
12
12
|
* @property {string} [expectedAddr] - The expected smart wallet hex address to be created (for MAKE_ACCOUNT only, format: 0x...)
|
|
13
13
|
* @property {TxStatus} status - Current status of the transaction (pending, success, or failed)
|
|
14
14
|
* @property {string} [rejectionReason] - Optional reason for failure (only present when status is 'failed')
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* @enum {(typeof TxStatus)[keyof typeof TxStatus]}
|
|
23
23
|
*/
|
|
24
24
|
export const TxStatus = /** @type {const} */ ({
|
|
25
|
+
SETUP: 'setup',
|
|
25
26
|
PENDING: 'pending',
|
|
26
27
|
SUCCESS: 'success',
|
|
27
28
|
FAILED: 'failed',
|
|
@@ -31,12 +32,21 @@ harden(TxStatus);
|
|
|
31
32
|
/**
|
|
32
33
|
* Tx types for published transactions
|
|
33
34
|
*
|
|
34
|
-
* @enum {(typeof TxType)[keyof typeof TxType]}
|
|
35
|
+
* @enum {Readonly<(typeof TxType)[keyof typeof TxType]>}
|
|
35
36
|
*/
|
|
36
37
|
export const TxType = /** @type {const} */ ({
|
|
37
38
|
CCTP_TO_EVM: 'CCTP_TO_EVM',
|
|
38
39
|
GMP: 'GMP',
|
|
39
40
|
CCTP_TO_AGORIC: 'CCTP_TO_AGORIC',
|
|
41
|
+
IBC_FROM_AGORIC: 'IBC_FROM_AGORIC',
|
|
42
|
+
IBC_FROM_REMOTE: 'IBC_FROM_REMOTE',
|
|
40
43
|
MAKE_ACCOUNT: 'MAKE_ACCOUNT',
|
|
44
|
+
/**
|
|
45
|
+
* Placeholder for ProgressTracker protocols not yet recognized by the
|
|
46
|
+
* resolver, just so they can be published to vstorage, but not processed any
|
|
47
|
+
* further. If these appear, it means the resolver source code needs to be
|
|
48
|
+
* updated.
|
|
49
|
+
*/
|
|
50
|
+
UNKNOWN: 'UNKNOWN',
|
|
41
51
|
});
|
|
42
52
|
harden(TxType);
|
package/src/types.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import type { NatAmount } from '@agoric/ertp';
|
|
2
|
-
import { type AccountId, type Bech32Address, type CosmosChainAddress } from '@agoric/orchestration';
|
|
2
|
+
import { type AccountId, type Bech32Address, type CosmosChainAddress, type TrafficEntry } from '@agoric/orchestration';
|
|
3
3
|
import type { SupportedChain, YieldProtocol } from './constants.js';
|
|
4
4
|
import type { InstrumentId } from './instruments.js';
|
|
5
5
|
import type { PublishedTx } from './resolver.js';
|
|
6
|
+
/**
|
|
7
|
+
* Feature flags to handle contract upgrade flow compatibility.
|
|
8
|
+
*/
|
|
9
|
+
export type FlowFeatures = {
|
|
10
|
+
/** Control `ProgressTracker` support. */
|
|
11
|
+
useProgressTracker?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Configuration options for flows.
|
|
15
|
+
*/
|
|
16
|
+
export type FlowConfig = {
|
|
17
|
+
features?: FlowFeatures;
|
|
18
|
+
};
|
|
6
19
|
export type SeatKeyword = 'Cash' | 'Deposit';
|
|
7
20
|
/**
|
|
8
21
|
* Reference to a local chain accounts (LCA).
|
|
@@ -106,12 +119,16 @@ export type FlowStep = {
|
|
|
106
119
|
amount: NatAmount;
|
|
107
120
|
src: AssetPlaceRef;
|
|
108
121
|
dest: AssetPlaceRef;
|
|
122
|
+
phases?: Record<string, any>;
|
|
109
123
|
};
|
|
110
124
|
export type FundsFlowPlan = {
|
|
111
125
|
flow: MovementDesc[];
|
|
112
126
|
/** default to full order */
|
|
113
127
|
order?: [target: number, prereqs: number[]][];
|
|
114
128
|
};
|
|
129
|
+
export type TrafficReport = {
|
|
130
|
+
traffic: TrafficEntry[];
|
|
131
|
+
};
|
|
115
132
|
export type PortfolioKey = `portfolio${number}`;
|
|
116
133
|
export type FlowKey = `flow${number}`;
|
|
117
134
|
export type StatusFor = {
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceR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QACT,YAAY,EAAE,YAAY,EAAE,CAAC;QAC7B,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;QAC7D,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;QACnC,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,0FAA0F;QAC1F,sBAAsB,CAAC,EAAE,aAAa,CAAC;QACvC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,6GAA6G;QAC7G,aAAa,EAAE,MAAM,CAAC;QACtB,yGAAyG;QACzG,cAAc,EAAE,MAAM,CAAC;QACvB,2CAA2C;QAC3C,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KAC5C,CAAC;IACF,QAAQ,EAAE;QACR,QAAQ,EAAE,aAAa,CAAC;QACxB,SAAS,EAAE,SAAS,CAAC;QACrB,OAAO,EAAE,SAAS,CAAC;QACnB,QAAQ,EAAE,SAAS,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAC1C,SAAS,GACT,UAAU,GACV,WAAW,GACX,iBAAiB,CAAC"}
|
package/src/types.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type AccountId,
|
|
5
5
|
type Bech32Address,
|
|
6
6
|
type CosmosChainAddress,
|
|
7
|
+
type TrafficEntry,
|
|
7
8
|
} from '@agoric/orchestration';
|
|
8
9
|
import type {
|
|
9
10
|
ContinuingInvitationSpec,
|
|
@@ -13,6 +14,20 @@ import type { SupportedChain, YieldProtocol } from './constants.js';
|
|
|
13
14
|
import type { InstrumentId } from './instruments.js';
|
|
14
15
|
import type { PublishedTx } from './resolver.js';
|
|
15
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Feature flags to handle contract upgrade flow compatibility.
|
|
19
|
+
*/
|
|
20
|
+
export type FlowFeatures = {
|
|
21
|
+
/** Control `ProgressTracker` support. */
|
|
22
|
+
useProgressTracker?: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Configuration options for flows.
|
|
27
|
+
*/
|
|
28
|
+
export type FlowConfig = {
|
|
29
|
+
features?: FlowFeatures;
|
|
30
|
+
};
|
|
16
31
|
export type SeatKeyword = 'Cash' | 'Deposit';
|
|
17
32
|
|
|
18
33
|
/**
|
|
@@ -104,6 +119,7 @@ export type FlowStep = {
|
|
|
104
119
|
amount: NatAmount;
|
|
105
120
|
src: AssetPlaceRef;
|
|
106
121
|
dest: AssetPlaceRef;
|
|
122
|
+
phases?: Record<string, any>;
|
|
107
123
|
// XXX all parts: fee etc.
|
|
108
124
|
};
|
|
109
125
|
|
|
@@ -113,6 +129,10 @@ export type FundsFlowPlan = {
|
|
|
113
129
|
order?: [target: number, prereqs: number[]][];
|
|
114
130
|
};
|
|
115
131
|
|
|
132
|
+
export type TrafficReport = {
|
|
133
|
+
traffic: TrafficEntry[];
|
|
134
|
+
};
|
|
135
|
+
|
|
116
136
|
export type PortfolioKey = `portfolio${number}`;
|
|
117
137
|
export type FlowKey = `flow${number}`;
|
|
118
138
|
|