@agoric/portfolio-api 0.1.1-dev-68c3c09.0.68c3c09 → 0.1.1-dev-f43bc52.0.f43bc52
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 +6 -5
- package/src/constants.d.ts +12 -1
- package/src/constants.d.ts.map +1 -1
- package/src/constants.js +24 -2
- package/src/resolver.d.ts +4 -0
- package/src/resolver.d.ts.map +1 -1
- package/src/resolver.js +1 -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-f43bc52.0.f43bc52",
|
|
4
4
|
"description": "API for Portfolio management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"generate:ymax-machine": "npx tsx scripts/gen-ymax-machine.mts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
31
|
-
"@endo/common": "^1.2.13"
|
|
30
|
+
"@agoric/orchestration": "0.1.1-dev-f43bc52.0.f43bc52",
|
|
31
|
+
"@endo/common": "^1.2.13",
|
|
32
|
+
"@endo/patterns": "^1.7.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@agoric/internal": "0.3.3-dev-
|
|
35
|
+
"@agoric/internal": "0.3.3-dev-f43bc52.0.f43bc52",
|
|
35
36
|
"@types/js-yaml": "^4",
|
|
36
37
|
"ajv": "^6.12.6",
|
|
37
38
|
"ava": "^5.3.0",
|
|
@@ -64,5 +65,5 @@
|
|
|
64
65
|
"engines": {
|
|
65
66
|
"node": "^20.9 || ^22.11"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "f43bc52c354835c10718eb6a0d15183572235d07"
|
|
68
69
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import {ClusterName} from '@agoric/internal';
|
|
2
|
+
* @import {ClusterName, TypedPattern} from '@agoric/internal';
|
|
3
3
|
* @import {CaipChainId} from '@agoric/orchestration';
|
|
4
4
|
* @import {FlowConfig} from './types.js';
|
|
5
5
|
*/
|
|
@@ -92,7 +92,18 @@ export namespace RebalanceStrategy {
|
|
|
92
92
|
* This corresponds to 100 uusdc, i.e., $0.0001 for USDC.
|
|
93
93
|
*/
|
|
94
94
|
export const ACCOUNT_DUST_EPSILON: 100n;
|
|
95
|
+
/**
|
|
96
|
+
* Feature flags to handle contract upgrade flow compatibility.
|
|
97
|
+
* @type {TypedPattern<FlowConfig['features']>}
|
|
98
|
+
*/
|
|
99
|
+
export const FlowFeaturesShape: TypedPattern<FlowConfig["features"]>;
|
|
100
|
+
/**
|
|
101
|
+
* Configuration options for flows.
|
|
102
|
+
* @type {TypedPattern<FlowConfig>}
|
|
103
|
+
*/
|
|
104
|
+
export const FlowConfigShape: TypedPattern<FlowConfig>;
|
|
95
105
|
import type { FlowConfig } from './types.js';
|
|
96
106
|
import type { ClusterName } from '@agoric/internal';
|
|
97
107
|
import type { CaipChainId } from '@agoric/orchestration';
|
|
108
|
+
import type { TypedPattern } from '@agoric/internal';
|
|
98
109
|
//# 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":"AAMA;;;;GAIG;AAEH;;;;;;;GAOG;AACH,kCAFU,UAAU,GAAG,SAAS,CAO9B;;;;4BAMQ,CAAC,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC;;;;;;;;;;;;;;qCAiBlD,CAAC,OAAO,sBAAsB,EAAE,MAAM,OAAO,sBAAsB,CAAC;;;;;;0BAUpE,CAAC,OAAO,WAAW,EAAE,M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,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;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,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
/// <reference types="ses" />
|
|
4
4
|
|
|
5
|
-
import { objectMap } from '@endo/
|
|
5
|
+
import { M, objectMap } from '@endo/patterns';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @import {ClusterName} from '@agoric/internal';
|
|
8
|
+
* @import {ClusterName, TypedPattern} from '@agoric/internal';
|
|
9
9
|
* @import {CaipChainId} from '@agoric/orchestration';
|
|
10
10
|
* @import {FlowConfig} from './types.js';
|
|
11
11
|
*/
|
|
@@ -190,3 +190,25 @@ harden(RebalanceStrategy);
|
|
|
190
190
|
* This corresponds to 100 uusdc, i.e., $0.0001 for USDC.
|
|
191
191
|
*/
|
|
192
192
|
export const ACCOUNT_DUST_EPSILON = 100n;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Feature flags to handle contract upgrade flow compatibility.
|
|
196
|
+
* @type {TypedPattern<FlowConfig['features']>}
|
|
197
|
+
*/
|
|
198
|
+
export const FlowFeaturesShape = M.splitRecord(
|
|
199
|
+
{},
|
|
200
|
+
{
|
|
201
|
+
useProgressTracker: M.boolean(),
|
|
202
|
+
},
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Configuration options for flows.
|
|
207
|
+
* @type {TypedPattern<FlowConfig>}
|
|
208
|
+
*/
|
|
209
|
+
export const FlowConfigShape = M.splitRecord(
|
|
210
|
+
{},
|
|
211
|
+
{
|
|
212
|
+
features: FlowFeaturesShape,
|
|
213
|
+
},
|
|
214
|
+
);
|
package/src/resolver.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export type PublishedTx = {
|
|
|
39
39
|
* - The destination account identifier for the transaction
|
|
40
40
|
*/
|
|
41
41
|
destinationAddress?: `${string}:${string}:${string}` | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* - The source LCA address initiating the transaction (for GMP transactions)
|
|
44
|
+
*/
|
|
45
|
+
sourceAddress?: `${string}:${string}:${string}` | undefined;
|
|
42
46
|
/**
|
|
43
47
|
* - The expected smart wallet hex address to be created (for MAKE_ACCOUNT only, format: 0x...)
|
|
44
48
|
*/
|
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":";;;;;uBAsBU,CAAC,OAAO,QAAQ,EAAE,MAAM,OAAO,QAAQ,CAAC;;;;;;;;;;qBAaxC,QAAQ,CAAC,CAAC,OAAO,MAAM,EAAE,MAAM,OAAO,MAAM,CAAC,CAAC;;;;;;;;;;;;;;;;;UA3B1C,MAAM;;;;;;;;;;;;;;;;;;;;YAKN,QAAQ"}
|
package/src/resolver.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
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
11
|
* @property {AccountId} [destinationAddress] - The destination account identifier for the transaction
|
|
12
|
+
* @property {AccountId} [sourceAddress] - The source LCA address initiating the transaction (for GMP transactions)
|
|
12
13
|
* @property {string} [expectedAddr] - The expected smart wallet hex address to be created (for MAKE_ACCOUNT only, format: 0x...)
|
|
13
14
|
* @property {TxStatus} status - Current status of the transaction (pending, success, or failed)
|
|
14
15
|
* @property {string} [rejectionReason] - Optional reason for failure (only present when status is 'failed')
|