@emberai/onchain-actions-registry 1.0.0-alpha.8 → 1.0.0
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/dist/index.cjs +13 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -452
- package/dist/index.d.ts +17 -452
- package/dist/index.js +13 -110
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
BalanceSchema: () => BalanceSchema,
|
|
34
33
|
BorrowTokensRequestSchema: () => BorrowTokensRequestSchema,
|
|
35
34
|
BorrowTokensResponseSchema: () => BorrowTokensResponseSchema,
|
|
36
35
|
ChainSchema: () => ChainSchema,
|
|
@@ -41,8 +40,6 @@ __export(index_exports, {
|
|
|
41
40
|
CreatePerpetualsPositionResponseSchema: () => CreatePerpetualsPositionResponseSchema,
|
|
42
41
|
DecreasePositionSwapTypeSchema: () => DecreasePositionSwapTypeSchema,
|
|
43
42
|
FeeBreakdownSchema: () => FeeBreakdownSchema,
|
|
44
|
-
GetChainsRequestSchema: () => GetChainsRequestSchema,
|
|
45
|
-
GetChainsResponseSchema: () => GetChainsResponseSchema,
|
|
46
43
|
GetLiquidityPoolsResponseSchema: () => GetLiquidityPoolsResponseSchema,
|
|
47
44
|
GetPerpetualsMarketsOrdersRequestSchema: () => GetPerpetualsMarketsOrdersRequestSchema,
|
|
48
45
|
GetPerpetualsMarketsOrdersResponseSchema: () => GetPerpetualsMarketsOrdersResponseSchema,
|
|
@@ -50,12 +47,6 @@ __export(index_exports, {
|
|
|
50
47
|
GetPerpetualsMarketsPositionsResponseSchema: () => GetPerpetualsMarketsPositionsResponseSchema,
|
|
51
48
|
GetPerpetualsMarketsRequestSchema: () => GetPerpetualsMarketsRequestSchema,
|
|
52
49
|
GetPerpetualsMarketsResponseSchema: () => GetPerpetualsMarketsResponseSchema,
|
|
53
|
-
GetProviderTrackingStatusRequestSchema: () => GetProviderTrackingStatusRequestSchema,
|
|
54
|
-
GetProviderTrackingStatusResponseSchema: () => GetProviderTrackingStatusResponseSchema,
|
|
55
|
-
GetTokensRequestSchema: () => GetTokensRequestSchema,
|
|
56
|
-
GetTokensResponseSchema: () => GetTokensResponseSchema,
|
|
57
|
-
GetWalletBalancesRequestSchema: () => GetWalletBalancesRequestSchema,
|
|
58
|
-
GetWalletBalancesResponseSchema: () => GetWalletBalancesResponseSchema,
|
|
59
50
|
GetWalletLendingPositionsRequestSchema: () => GetWalletLendingPositionsRequestSchema,
|
|
60
51
|
GetWalletLendingPositionsResponseSchema: () => GetWalletLendingPositionsResponseSchema,
|
|
61
52
|
GetWalletLiquidityPositionsRequestSchema: () => GetWalletLiquidityPositionsRequestSchema,
|
|
@@ -67,22 +58,16 @@ __export(index_exports, {
|
|
|
67
58
|
LiquidityPositionSchema: () => LiquidityPositionSchema,
|
|
68
59
|
LiquidityProvisionRangeSchema: () => LiquidityProvisionRangeSchema,
|
|
69
60
|
OrderSchema: () => OrderSchema,
|
|
70
|
-
OrderTypeSchema: () => OrderTypeSchema,
|
|
71
|
-
OrderTypes: () => OrderTypes,
|
|
72
61
|
OrdersDataSchema: () => OrdersDataSchema,
|
|
73
62
|
PerpetualMarketSchema: () => PerpetualMarketSchema,
|
|
74
63
|
PositionSchema: () => PositionSchema,
|
|
75
64
|
PositionSideSchema: () => PositionSideSchema,
|
|
76
65
|
PositionsDataSchema: () => PositionsDataSchema,
|
|
77
|
-
ProviderStatusSchema: () => ProviderStatusSchema,
|
|
78
|
-
ProviderStatuses: () => ProviderStatuses,
|
|
79
66
|
ProviderTrackingInfoSchema: () => ProviderTrackingInfoSchema,
|
|
80
67
|
ProviderTrackingStatusSchema: () => ProviderTrackingStatusSchema,
|
|
81
68
|
PublicEmberPluginRegistry: () => PublicEmberPluginRegistry,
|
|
82
69
|
RepayTokensRequestSchema: () => RepayTokensRequestSchema,
|
|
83
70
|
RepayTokensResponseSchema: () => RepayTokensResponseSchema,
|
|
84
|
-
SearchableChainSchema: () => SearchableChainSchema,
|
|
85
|
-
SearchableTokenSchema: () => SearchableTokenSchema,
|
|
86
71
|
SupplyLiquidityRequestSchema: () => SupplyLiquidityRequestSchema,
|
|
87
72
|
SupplyLiquidityResponseSchema: () => SupplyLiquidityResponseSchema,
|
|
88
73
|
SupplyTokensRequestSchema: () => SupplyTokensRequestSchema,
|
|
@@ -95,8 +80,6 @@ __export(index_exports, {
|
|
|
95
80
|
TokenSchema: () => TokenSchema,
|
|
96
81
|
TransactionPlanErrorSchema: () => TransactionPlanErrorSchema,
|
|
97
82
|
TransactionPlanSchema: () => TransactionPlanSchema,
|
|
98
|
-
TransactionPlanStatusSchema: () => TransactionPlanStatusSchema,
|
|
99
|
-
TransactionPlanStatuses: () => TransactionPlanStatuses,
|
|
100
83
|
TransactionTypeSchema: () => TransactionTypeSchema,
|
|
101
84
|
TransactionTypes: () => TransactionTypes,
|
|
102
85
|
WithdrawLiquidityRequestSchema: () => WithdrawLiquidityRequestSchema,
|
|
@@ -672,14 +655,6 @@ var import_zod2 = require("zod");
|
|
|
672
655
|
// src/core/schemas/enums.ts
|
|
673
656
|
var import_zod = require("zod");
|
|
674
657
|
var ChainTypeSchema = import_zod.z.enum(["UNSPECIFIED", "EVM", "SOLANA", "COSMOS"]);
|
|
675
|
-
var OrderTypes = {
|
|
676
|
-
ORDER_TYPE_UNSPECIFIED: "ORDER_TYPE_UNSPECIFIED",
|
|
677
|
-
MARKET_BUY: "MARKET_BUY",
|
|
678
|
-
MARKET_SELL: "MARKET_SELL",
|
|
679
|
-
LIMIT_BUY: "LIMIT_BUY",
|
|
680
|
-
LIMIT_SELL: "LIMIT_SELL"
|
|
681
|
-
};
|
|
682
|
-
var OrderTypeSchema = import_zod.z.enum(Object.values(OrderTypes));
|
|
683
658
|
var TransactionTypes = {
|
|
684
659
|
TRANSACTION_TYPE_UNSPECIFIED: "TRANSACTION_TYPE_UNSPECIFIED",
|
|
685
660
|
EVM_TX: "EVM_TX",
|
|
@@ -688,25 +663,6 @@ var TransactionTypes = {
|
|
|
688
663
|
var TransactionTypeSchema = import_zod.z.enum(
|
|
689
664
|
Object.values(TransactionTypes)
|
|
690
665
|
);
|
|
691
|
-
var TransactionPlanStatuses = {
|
|
692
|
-
UNSPECIFIED: "UNSPECIFIED",
|
|
693
|
-
SUCCESS: "SUCCESS",
|
|
694
|
-
ERROR: "ERROR"
|
|
695
|
-
};
|
|
696
|
-
var TransactionPlanStatusSchema = import_zod.z.enum(
|
|
697
|
-
Object.values(TransactionPlanStatuses)
|
|
698
|
-
);
|
|
699
|
-
var ProviderStatuses = {
|
|
700
|
-
PROVIDER_STATUS_UNSPECIFIED: "PROVIDER_STATUS_UNSPECIFIED",
|
|
701
|
-
PROVIDER_STATUS_SUCCESS: "PROVIDER_STATUS_SUCCESS",
|
|
702
|
-
PROVIDER_STATUS_ONGOING: "PROVIDER_STATUS_ONGOING",
|
|
703
|
-
PROVIDER_STATUS_NEEDS_GAS: "PROVIDER_STATUS_NEEDS_GAS",
|
|
704
|
-
PROVIDER_STATUS_PARTIAL_SUCCESS: "PROVIDER_STATUS_PARTIAL_SUCCESS",
|
|
705
|
-
PROVIDER_STATUS_NOT_FOUND: "PROVIDER_STATUS_NOT_FOUND"
|
|
706
|
-
};
|
|
707
|
-
var ProviderStatusSchema = import_zod.z.enum(
|
|
708
|
-
Object.values(ProviderStatuses)
|
|
709
|
-
);
|
|
710
666
|
|
|
711
667
|
// src/core/schemas/core.ts
|
|
712
668
|
var TokenIdentifierSchema = import_zod2.z.object({
|
|
@@ -722,15 +678,6 @@ var TokenSchema = import_zod2.z.object({
|
|
|
722
678
|
iconUri: import_zod2.z.string().nullish(),
|
|
723
679
|
isVetted: import_zod2.z.boolean()
|
|
724
680
|
});
|
|
725
|
-
var SearchableTokenSchema = import_zod2.z.object({
|
|
726
|
-
tokenUid: TokenIdentifierSchema,
|
|
727
|
-
name: import_zod2.z.string(),
|
|
728
|
-
symbol: import_zod2.z.string()
|
|
729
|
-
});
|
|
730
|
-
var SearchableChainSchema = import_zod2.z.object({
|
|
731
|
-
chainId: import_zod2.z.string(),
|
|
732
|
-
name: import_zod2.z.string()
|
|
733
|
-
});
|
|
734
681
|
var ChainSchema = import_zod2.z.object({
|
|
735
682
|
chainId: import_zod2.z.string(),
|
|
736
683
|
type: ChainTypeSchema,
|
|
@@ -775,13 +722,6 @@ var ProviderTrackingStatusSchema = import_zod2.z.object({
|
|
|
775
722
|
explorerUrl: import_zod2.z.string(),
|
|
776
723
|
status: import_zod2.z.string()
|
|
777
724
|
});
|
|
778
|
-
var BalanceSchema = import_zod2.z.object({
|
|
779
|
-
tokenUid: TokenIdentifierSchema,
|
|
780
|
-
amount: import_zod2.z.string(),
|
|
781
|
-
symbol: import_zod2.z.string().optional(),
|
|
782
|
-
valueUsd: import_zod2.z.number().optional(),
|
|
783
|
-
decimals: import_zod2.z.number().int().optional()
|
|
784
|
-
});
|
|
785
725
|
|
|
786
726
|
// src/core/schemas/lending.ts
|
|
787
727
|
var import_zod3 = require("zod");
|
|
@@ -1040,66 +980,29 @@ var GetPerpetualsMarketsResponseSchema = import_zod5.z.object({
|
|
|
1040
980
|
markets: import_zod5.z.array(PerpetualMarketSchema)
|
|
1041
981
|
});
|
|
1042
982
|
|
|
1043
|
-
// src/core/schemas/requests.ts
|
|
1044
|
-
var import_zod6 = require("zod");
|
|
1045
|
-
var GetChainsRequestSchema = import_zod6.z.object({
|
|
1046
|
-
filter: import_zod6.z.string()
|
|
1047
|
-
});
|
|
1048
|
-
var GetChainsResponseSchema = import_zod6.z.object({
|
|
1049
|
-
chains: import_zod6.z.array(ChainSchema)
|
|
1050
|
-
});
|
|
1051
|
-
var GetTokensRequestSchema = import_zod6.z.object({
|
|
1052
|
-
chainIds: import_zod6.z.array(import_zod6.z.string()).optional()
|
|
1053
|
-
});
|
|
1054
|
-
var GetTokensResponseSchema = import_zod6.z.object({
|
|
1055
|
-
tokens: import_zod6.z.array(TokenSchema)
|
|
1056
|
-
});
|
|
1057
|
-
|
|
1058
983
|
// src/core/schemas/swap.ts
|
|
1059
|
-
var
|
|
1060
|
-
var SwapTokensRequestSchema =
|
|
984
|
+
var import_zod6 = require("zod");
|
|
985
|
+
var SwapTokensRequestSchema = import_zod6.z.object({
|
|
1061
986
|
fromToken: TokenSchema,
|
|
1062
987
|
toToken: TokenSchema,
|
|
1063
|
-
amount:
|
|
1064
|
-
limitPrice:
|
|
1065
|
-
slippageTolerance:
|
|
1066
|
-
expiration:
|
|
1067
|
-
recipient:
|
|
988
|
+
amount: import_zod6.z.bigint(),
|
|
989
|
+
limitPrice: import_zod6.z.string().optional(),
|
|
990
|
+
slippageTolerance: import_zod6.z.string().optional(),
|
|
991
|
+
expiration: import_zod6.z.string().optional(),
|
|
992
|
+
recipient: import_zod6.z.string()
|
|
1068
993
|
});
|
|
1069
|
-
var SwapTokensResponseSchema =
|
|
994
|
+
var SwapTokensResponseSchema = import_zod6.z.object({
|
|
1070
995
|
fromToken: TokenSchema,
|
|
1071
996
|
toToken: TokenSchema,
|
|
1072
|
-
exactFromAmount:
|
|
1073
|
-
displayFromAmount:
|
|
1074
|
-
exactToAmount:
|
|
1075
|
-
displayToAmount:
|
|
1076
|
-
transactions:
|
|
997
|
+
exactFromAmount: import_zod6.z.string(),
|
|
998
|
+
displayFromAmount: import_zod6.z.string(),
|
|
999
|
+
exactToAmount: import_zod6.z.string(),
|
|
1000
|
+
displayToAmount: import_zod6.z.string(),
|
|
1001
|
+
transactions: import_zod6.z.array(TransactionPlanSchema),
|
|
1077
1002
|
feeBreakdown: FeeBreakdownSchema.optional(),
|
|
1078
1003
|
estimation: SwapEstimationSchema.optional(),
|
|
1079
1004
|
providerTracking: ProviderTrackingInfoSchema.optional()
|
|
1080
1005
|
});
|
|
1081
|
-
var GetProviderTrackingStatusRequestSchema = import_zod7.z.object({
|
|
1082
|
-
requestId: import_zod7.z.string(),
|
|
1083
|
-
transactionId: import_zod7.z.string()
|
|
1084
|
-
});
|
|
1085
|
-
var GetProviderTrackingStatusResponseSchema = import_zod7.z.object({
|
|
1086
|
-
trackingStatus: import_zod7.z.object({
|
|
1087
|
-
requestId: import_zod7.z.string(),
|
|
1088
|
-
transactionId: import_zod7.z.string(),
|
|
1089
|
-
providerName: import_zod7.z.string(),
|
|
1090
|
-
explorerUrl: import_zod7.z.string(),
|
|
1091
|
-
status: import_zod7.z.string()
|
|
1092
|
-
})
|
|
1093
|
-
});
|
|
1094
|
-
|
|
1095
|
-
// src/core/schemas/wallet.ts
|
|
1096
|
-
var import_zod8 = require("zod");
|
|
1097
|
-
var GetWalletBalancesRequestSchema = import_zod8.z.object({
|
|
1098
|
-
walletAddress: import_zod8.z.string()
|
|
1099
|
-
});
|
|
1100
|
-
var GetWalletBalancesResponseSchema = import_zod8.z.object({
|
|
1101
|
-
balances: import_zod8.z.array(BalanceSchema)
|
|
1102
|
-
});
|
|
1103
1006
|
|
|
1104
1007
|
// src/aave-lending-plugin/adapter.ts
|
|
1105
1008
|
var AAVE_ETH_PLACEHOLDER = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
@@ -1569,7 +1472,6 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1569
1472
|
}
|
|
1570
1473
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1571
1474
|
0 && (module.exports = {
|
|
1572
|
-
BalanceSchema,
|
|
1573
1475
|
BorrowTokensRequestSchema,
|
|
1574
1476
|
BorrowTokensResponseSchema,
|
|
1575
1477
|
ChainSchema,
|
|
@@ -1580,8 +1482,6 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1580
1482
|
CreatePerpetualsPositionResponseSchema,
|
|
1581
1483
|
DecreasePositionSwapTypeSchema,
|
|
1582
1484
|
FeeBreakdownSchema,
|
|
1583
|
-
GetChainsRequestSchema,
|
|
1584
|
-
GetChainsResponseSchema,
|
|
1585
1485
|
GetLiquidityPoolsResponseSchema,
|
|
1586
1486
|
GetPerpetualsMarketsOrdersRequestSchema,
|
|
1587
1487
|
GetPerpetualsMarketsOrdersResponseSchema,
|
|
@@ -1589,12 +1489,6 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1589
1489
|
GetPerpetualsMarketsPositionsResponseSchema,
|
|
1590
1490
|
GetPerpetualsMarketsRequestSchema,
|
|
1591
1491
|
GetPerpetualsMarketsResponseSchema,
|
|
1592
|
-
GetProviderTrackingStatusRequestSchema,
|
|
1593
|
-
GetProviderTrackingStatusResponseSchema,
|
|
1594
|
-
GetTokensRequestSchema,
|
|
1595
|
-
GetTokensResponseSchema,
|
|
1596
|
-
GetWalletBalancesRequestSchema,
|
|
1597
|
-
GetWalletBalancesResponseSchema,
|
|
1598
1492
|
GetWalletLendingPositionsRequestSchema,
|
|
1599
1493
|
GetWalletLendingPositionsResponseSchema,
|
|
1600
1494
|
GetWalletLiquidityPositionsRequestSchema,
|
|
@@ -1606,22 +1500,16 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1606
1500
|
LiquidityPositionSchema,
|
|
1607
1501
|
LiquidityProvisionRangeSchema,
|
|
1608
1502
|
OrderSchema,
|
|
1609
|
-
OrderTypeSchema,
|
|
1610
|
-
OrderTypes,
|
|
1611
1503
|
OrdersDataSchema,
|
|
1612
1504
|
PerpetualMarketSchema,
|
|
1613
1505
|
PositionSchema,
|
|
1614
1506
|
PositionSideSchema,
|
|
1615
1507
|
PositionsDataSchema,
|
|
1616
|
-
ProviderStatusSchema,
|
|
1617
|
-
ProviderStatuses,
|
|
1618
1508
|
ProviderTrackingInfoSchema,
|
|
1619
1509
|
ProviderTrackingStatusSchema,
|
|
1620
1510
|
PublicEmberPluginRegistry,
|
|
1621
1511
|
RepayTokensRequestSchema,
|
|
1622
1512
|
RepayTokensResponseSchema,
|
|
1623
|
-
SearchableChainSchema,
|
|
1624
|
-
SearchableTokenSchema,
|
|
1625
1513
|
SupplyLiquidityRequestSchema,
|
|
1626
1514
|
SupplyLiquidityResponseSchema,
|
|
1627
1515
|
SupplyTokensRequestSchema,
|
|
@@ -1634,8 +1522,6 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1634
1522
|
TokenSchema,
|
|
1635
1523
|
TransactionPlanErrorSchema,
|
|
1636
1524
|
TransactionPlanSchema,
|
|
1637
|
-
TransactionPlanStatusSchema,
|
|
1638
|
-
TransactionPlanStatuses,
|
|
1639
1525
|
TransactionTypeSchema,
|
|
1640
1526
|
TransactionTypes,
|
|
1641
1527
|
WithdrawLiquidityRequestSchema,
|