@emberai/onchain-actions-registry 1.0.0-alpha.3
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/aave-lending-plugin/adapter.d.ts +56 -0
- package/dist/aave-lending-plugin/adapter.d.ts.map +1 -0
- package/dist/aave-lending-plugin/adapter.js +326 -0
- package/dist/aave-lending-plugin/adapter.js.map +1 -0
- package/dist/aave-lending-plugin/chain.d.ts +30 -0
- package/dist/aave-lending-plugin/chain.d.ts.map +1 -0
- package/dist/aave-lending-plugin/chain.js +36 -0
- package/dist/aave-lending-plugin/chain.js.map +1 -0
- package/dist/aave-lending-plugin/dataProvider.d.ts +19 -0
- package/dist/aave-lending-plugin/dataProvider.d.ts.map +1 -0
- package/dist/aave-lending-plugin/dataProvider.js +18 -0
- package/dist/aave-lending-plugin/dataProvider.js.map +1 -0
- package/dist/aave-lending-plugin/errors.d.ts +13 -0
- package/dist/aave-lending-plugin/errors.d.ts.map +1 -0
- package/dist/aave-lending-plugin/errors.js +366 -0
- package/dist/aave-lending-plugin/errors.js.map +1 -0
- package/dist/aave-lending-plugin/index.d.ts +24 -0
- package/dist/aave-lending-plugin/index.d.ts.map +1 -0
- package/dist/aave-lending-plugin/index.js +136 -0
- package/dist/aave-lending-plugin/index.js.map +1 -0
- package/dist/aave-lending-plugin/market.d.ts +11 -0
- package/dist/aave-lending-plugin/market.d.ts.map +1 -0
- package/dist/aave-lending-plugin/market.js +22 -0
- package/dist/aave-lending-plugin/market.js.map +1 -0
- package/dist/aave-lending-plugin/populateTransaction.d.ts +4 -0
- package/dist/aave-lending-plugin/populateTransaction.d.ts.map +1 -0
- package/dist/aave-lending-plugin/populateTransaction.js +31 -0
- package/dist/aave-lending-plugin/populateTransaction.js.map +1 -0
- package/dist/aave-lending-plugin/userSummary.d.ts +15 -0
- package/dist/aave-lending-plugin/userSummary.d.ts.map +1 -0
- package/dist/aave-lending-plugin/userSummary.js +62 -0
- package/dist/aave-lending-plugin/userSummary.js.map +1 -0
- package/dist/chainConfig.d.ts +10 -0
- package/dist/chainConfig.d.ts.map +1 -0
- package/dist/chainConfig.js +2 -0
- package/dist/chainConfig.js.map +1 -0
- package/dist/core/actions/index.d.ts +6 -0
- package/dist/core/actions/index.d.ts.map +1 -0
- package/dist/core/actions/index.js +2 -0
- package/dist/core/actions/index.js.map +1 -0
- package/dist/core/actions/lending.d.ts +22 -0
- package/dist/core/actions/lending.d.ts.map +1 -0
- package/dist/core/actions/lending.js +2 -0
- package/dist/core/actions/lending.js.map +1 -0
- package/dist/core/actions/liquidity.d.ts +14 -0
- package/dist/core/actions/liquidity.d.ts.map +1 -0
- package/dist/core/actions/liquidity.js +2 -0
- package/dist/core/actions/liquidity.js.map +1 -0
- package/dist/core/actions/perpetuals.d.ts +6 -0
- package/dist/core/actions/perpetuals.d.ts.map +1 -0
- package/dist/core/actions/perpetuals.js +2 -0
- package/dist/core/actions/perpetuals.js.map +1 -0
- package/dist/core/actions/swap.d.ts +10 -0
- package/dist/core/actions/swap.d.ts.map +1 -0
- package/dist/core/actions/swap.js +2 -0
- package/dist/core/actions/swap.js.map +1 -0
- package/dist/core/actions/types.d.ts +70 -0
- package/dist/core/actions/types.d.ts.map +1 -0
- package/dist/core/actions/types.js +2 -0
- package/dist/core/actions/types.js.map +1 -0
- package/dist/core/index.d.ts +41 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/pluginType.d.ts +25 -0
- package/dist/core/pluginType.d.ts.map +1 -0
- package/dist/core/pluginType.js +2 -0
- package/dist/core/pluginType.js.map +1 -0
- package/dist/core/queries/index.d.ts +4 -0
- package/dist/core/queries/index.d.ts.map +1 -0
- package/dist/core/queries/index.js +4 -0
- package/dist/core/queries/index.js.map +1 -0
- package/dist/core/queries/lending.d.ts +12 -0
- package/dist/core/queries/lending.d.ts.map +1 -0
- package/dist/core/queries/lending.js +2 -0
- package/dist/core/queries/lending.js.map +1 -0
- package/dist/core/queries/liquidity.d.ts +17 -0
- package/dist/core/queries/liquidity.d.ts.map +1 -0
- package/dist/core/queries/liquidity.js +2 -0
- package/dist/core/queries/liquidity.js.map +1 -0
- package/dist/core/queries/perpetuals.d.ts +10 -0
- package/dist/core/queries/perpetuals.d.ts.map +1 -0
- package/dist/core/queries/perpetuals.js +2 -0
- package/dist/core/queries/perpetuals.js.map +1 -0
- package/dist/core/schemas/core.d.ts +315 -0
- package/dist/core/schemas/core.d.ts.map +1 -0
- package/dist/core/schemas/core.js +76 -0
- package/dist/core/schemas/core.js.map +1 -0
- package/dist/core/schemas/enums.d.ts +37 -0
- package/dist/core/schemas/enums.d.ts.map +1 -0
- package/dist/core/schemas/enums.js +36 -0
- package/dist/core/schemas/enums.js.map +1 -0
- package/dist/core/schemas/index.d.ts +9 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js +9 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/schemas/lending.d.ts +903 -0
- package/dist/core/schemas/lending.d.ts.map +1 -0
- package/dist/core/schemas/lending.js +71 -0
- package/dist/core/schemas/lending.js.map +1 -0
- package/dist/core/schemas/liquidity.d.ts +604 -0
- package/dist/core/schemas/liquidity.d.ts.map +1 -0
- package/dist/core/schemas/liquidity.js +74 -0
- package/dist/core/schemas/liquidity.js.map +1 -0
- package/dist/core/schemas/perpetuals.d.ts +974 -0
- package/dist/core/schemas/perpetuals.d.ts.map +1 -0
- package/dist/core/schemas/perpetuals.js +116 -0
- package/dist/core/schemas/perpetuals.js.map +1 -0
- package/dist/core/schemas/requests.d.ts +218 -0
- package/dist/core/schemas/requests.d.ts.map +1 -0
- package/dist/core/schemas/requests.js +15 -0
- package/dist/core/schemas/requests.js.map +1 -0
- package/dist/core/schemas/swap.d.ts +451 -0
- package/dist/core/schemas/swap.d.ts.map +1 -0
- package/dist/core/schemas/swap.js +37 -0
- package/dist/core/schemas/swap.js.map +1 -0
- package/dist/core/schemas/wallet.d.ts +69 -0
- package/dist/core/schemas/wallet.d.ts.map +1 -0
- package/dist/core/schemas/wallet.js +9 -0
- package/dist/core/schemas/wallet.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +24 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +38 -0
- package/dist/registry.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { formatReserves, formatUserSummary, } from '@aave/math-utils';
|
|
2
|
+
function formatNumeric(value) {
|
|
3
|
+
const num = parseFloat(value);
|
|
4
|
+
if (Number.isInteger(num))
|
|
5
|
+
return num.toString();
|
|
6
|
+
return parseFloat(num.toFixed(2)).toString();
|
|
7
|
+
}
|
|
8
|
+
export class UserSummary {
|
|
9
|
+
reserves;
|
|
10
|
+
/**
|
|
11
|
+
* @param userReservesResponse - The response from getUserReservesHumanized.
|
|
12
|
+
* @param reservesResponse - The response from getReservesHumanized.
|
|
13
|
+
*/
|
|
14
|
+
constructor(userReservesResponse, reservesResponse) {
|
|
15
|
+
const currentTimestamp = Date.now() / 1000;
|
|
16
|
+
const formattedReserves = formatReserves({
|
|
17
|
+
reserves: reservesResponse.reservesData,
|
|
18
|
+
currentTimestamp,
|
|
19
|
+
marketReferenceCurrencyDecimals: reservesResponse.baseCurrencyData.marketReferenceCurrencyDecimals,
|
|
20
|
+
marketReferencePriceInUsd: reservesResponse.baseCurrencyData.marketReferenceCurrencyPriceInUsd,
|
|
21
|
+
});
|
|
22
|
+
this.reserves = formatUserSummary({
|
|
23
|
+
currentTimestamp,
|
|
24
|
+
marketReferencePriceInUsd: reservesResponse.baseCurrencyData.marketReferenceCurrencyPriceInUsd,
|
|
25
|
+
marketReferenceCurrencyDecimals: reservesResponse.baseCurrencyData.marketReferenceCurrencyDecimals,
|
|
26
|
+
userReserves: userReservesResponse.userReserves,
|
|
27
|
+
formattedReserves,
|
|
28
|
+
userEmodeCategoryId: userReservesResponse.userEmodeCategoryId,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
toHumanReadable() {
|
|
32
|
+
let output = 'User Positions:\n';
|
|
33
|
+
output += `Total Liquidity (USD): ${formatNumeric(this.reserves.totalLiquidityUSD)}\n`;
|
|
34
|
+
output += `Total Collateral (USD): ${formatNumeric(this.reserves.totalCollateralUSD)}\n`;
|
|
35
|
+
output += `Total Borrows (USD): ${formatNumeric(this.reserves.totalBorrowsUSD)}\n`;
|
|
36
|
+
output += `Net Worth (USD): ${formatNumeric(this.reserves.netWorthUSD)}\n`;
|
|
37
|
+
output += `Health Factor: ${formatNumeric(this.reserves.healthFactor)}\n\n`;
|
|
38
|
+
output += 'Deposits:\n';
|
|
39
|
+
for (const entry of this.reserves.userReservesData) {
|
|
40
|
+
if (parseFloat(entry.scaledATokenBalance) > 0) {
|
|
41
|
+
const underlying = entry.underlyingBalance;
|
|
42
|
+
const underlyingUSD = entry.underlyingBalanceUSD
|
|
43
|
+
? formatNumeric(entry.underlyingBalanceUSD)
|
|
44
|
+
: 'N/A';
|
|
45
|
+
output += `- ${entry.reserve.symbol}: ${underlying} (USD: ${underlyingUSD})\n`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
output += '\nLoans:\n';
|
|
49
|
+
for (const entry of this.reserves.userReservesData) {
|
|
50
|
+
const borrow = entry.totalBorrows || '0';
|
|
51
|
+
if (parseFloat(borrow) > 0) {
|
|
52
|
+
const totalBorrows = entry.totalBorrows;
|
|
53
|
+
const totalBorrowsUSD = entry.totalBorrowsUSD
|
|
54
|
+
? formatNumeric(entry.totalBorrowsUSD)
|
|
55
|
+
: 'N/A';
|
|
56
|
+
output += `- ${entry.reserve.symbol}: ${totalBorrows} (USD: ${totalBorrowsUSD})\n`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return output;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=userSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userSummary.js","sourceRoot":"","sources":["../../src/aave-lending-plugin/userSummary.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainConfig.d.ts","sourceRoot":"","sources":["../src/chainConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainConfig.js","sourceRoot":"","sources":["../src/chainConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { Action, ActionDefinition, TokenSet } from './types.js';
|
|
2
|
+
export type { LendingActions } from './lending.js';
|
|
3
|
+
export type { LiquidityActions } from './liquidity.js';
|
|
4
|
+
export type { SwapActions } from './swap.js';
|
|
5
|
+
export type { PerpetualsActions } from './perpetuals.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/actions/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/actions/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BorrowTokensRequest, BorrowTokensResponse, RepayTokensRequest, RepayTokensResponse, SupplyTokensRequest, SupplyTokensResponse, WithdrawTokensRequest, WithdrawTokensResponse } from '../schemas/lending.js';
|
|
2
|
+
/**
|
|
3
|
+
* Callback function type for the borrow action.
|
|
4
|
+
*/
|
|
5
|
+
export type LendingBorrowCallback = (request: BorrowTokensRequest) => Promise<BorrowTokensResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* Callback function type for the repay tokens action.
|
|
8
|
+
*/
|
|
9
|
+
export type LendingRepayTokensCallback = (request: RepayTokensRequest) => Promise<RepayTokensResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Callback function type for the supply action.
|
|
12
|
+
*/
|
|
13
|
+
export type LendingSupplyCallback = (request: SupplyTokensRequest) => Promise<SupplyTokensResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function type for the withdraw action.
|
|
16
|
+
*/
|
|
17
|
+
export type LendingWithdrawCallback = (request: WithdrawTokensRequest) => Promise<WithdrawTokensResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* The possible actions related to lending.
|
|
20
|
+
*/
|
|
21
|
+
export type LendingActions = 'lending-borrow' | 'lending-repay' | 'lending-supply' | 'lending-withdraw';
|
|
22
|
+
//# sourceMappingURL=lending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lending.d.ts","sourceRoot":"","sources":["../../../src/core/actions/lending.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAEpG;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CACvC,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAEpG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lending.js","sourceRoot":"","sources":["../../../src/core/actions/lending.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SupplyLiquidityRequest, SupplyLiquidityResponse, WithdrawLiquidityRequest, WithdrawLiquidityResponse } from '../schemas/liquidity.js';
|
|
2
|
+
/**
|
|
3
|
+
* The callback function type for the supply liquidity action.
|
|
4
|
+
*/
|
|
5
|
+
export type LiquiditySupplyCallback = (request: SupplyLiquidityRequest) => Promise<SupplyLiquidityResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* The callback function type for the withdraw liquidity action.
|
|
8
|
+
*/
|
|
9
|
+
export type LiquidityWithdrawCallback = (request: WithdrawLiquidityRequest) => Promise<WithdrawLiquidityResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* The possible actions related to liquidity.
|
|
12
|
+
*/
|
|
13
|
+
export type LiquidityActions = 'liquidity-supply' | 'liquidity-withdraw';
|
|
14
|
+
//# sourceMappingURL=liquidity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity.d.ts","sourceRoot":"","sources":["../../../src/core/actions/liquidity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity.js","sourceRoot":"","sources":["../../../src/core/actions/liquidity.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClosePerpetualsOrdersRequest, ClosePerpetualsOrdersResponse, CreatePerpetualsPositionRequest, CreatePerpetualsPositionResponse } from '../schemas/perpetuals.js';
|
|
2
|
+
export type PerpetualsCreateShortPositionCallback = (request: CreatePerpetualsPositionRequest) => Promise<CreatePerpetualsPositionResponse>;
|
|
3
|
+
export type PerpetualsCreateLongPositionCallback = (request: CreatePerpetualsPositionRequest) => Promise<CreatePerpetualsPositionResponse>;
|
|
4
|
+
export type PerpetualsCloseOrdersCallback = (request: ClosePerpetualsOrdersRequest) => Promise<ClosePerpetualsOrdersResponse>;
|
|
5
|
+
export type PerpetualsActions = 'perpetuals-short' | 'perpetuals-long' | 'perpetuals-close';
|
|
6
|
+
//# sourceMappingURL=perpetuals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perpetuals.d.ts","sourceRoot":"","sources":["../../../src/core/actions/perpetuals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,qCAAqC,GAAG,CAClD,OAAO,EAAE,+BAA+B,KACrC,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAE/C,MAAM,MAAM,oCAAoC,GAAG,CACjD,OAAO,EAAE,+BAA+B,KACrC,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAE/C,MAAM,MAAM,6BAA6B,GAAG,CAC1C,OAAO,EAAE,4BAA4B,KAClC,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perpetuals.js","sourceRoot":"","sources":["../../../src/core/actions/perpetuals.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SwapTokensRequest, SwapTokensResponse } from '../schemas/swap.js';
|
|
2
|
+
/**
|
|
3
|
+
* Callback function type for the swap action.
|
|
4
|
+
*/
|
|
5
|
+
export type SwapActionCallback = (request: SwapTokensRequest) => Promise<SwapTokensResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* The possible actions related to swapping tokens.
|
|
8
|
+
*/
|
|
9
|
+
export type SwapActions = 'swap';
|
|
10
|
+
//# sourceMappingURL=swap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../../src/core/actions/swap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swap.js","sourceRoot":"","sources":["../../../src/core/actions/swap.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { SwapActionCallback, SwapActions } from './swap.js';
|
|
2
|
+
import type { LendingActions, LendingBorrowCallback, LendingRepayTokensCallback, LendingSupplyCallback, LendingWithdrawCallback } from './lending.js';
|
|
3
|
+
import type { LiquidityActions, LiquiditySupplyCallback, LiquidityWithdrawCallback } from './liquidity.js';
|
|
4
|
+
import type { PerpetualsActions, PerpetualsCloseOrdersCallback, PerpetualsCreateLongPositionCallback, PerpetualsCreateShortPositionCallback } from './perpetuals.js';
|
|
5
|
+
/**
|
|
6
|
+
* The possible actions an ember plugin can perform.
|
|
7
|
+
*/
|
|
8
|
+
export type Action = LendingActions | LiquidityActions | SwapActions | PerpetualsActions;
|
|
9
|
+
/**
|
|
10
|
+
* Type mapping for action callbacks.
|
|
11
|
+
*/
|
|
12
|
+
type CallbacksRecord = {
|
|
13
|
+
swap: SwapActionCallback;
|
|
14
|
+
'lending-borrow': LendingBorrowCallback;
|
|
15
|
+
'lending-repay': LendingRepayTokensCallback;
|
|
16
|
+
'lending-supply': LendingSupplyCallback;
|
|
17
|
+
'lending-withdraw': LendingWithdrawCallback;
|
|
18
|
+
'liquidity-supply': LiquiditySupplyCallback;
|
|
19
|
+
'liquidity-withdraw': LiquidityWithdrawCallback;
|
|
20
|
+
'perpetuals-short': PerpetualsCreateShortPositionCallback;
|
|
21
|
+
'perpetuals-long': PerpetualsCreateLongPositionCallback;
|
|
22
|
+
'perpetuals-close': PerpetualsCloseOrdersCallback;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Type mapping for action callbacks.
|
|
26
|
+
*/
|
|
27
|
+
export type ActionCallback<T extends keyof CallbacksRecord> = CallbacksRecord[T];
|
|
28
|
+
/**
|
|
29
|
+
* Represents a grouping of tokens associated with a specific chain.
|
|
30
|
+
*/
|
|
31
|
+
export interface TokenSet {
|
|
32
|
+
/**
|
|
33
|
+
* The chain id to which the tokens belong.
|
|
34
|
+
*/
|
|
35
|
+
chainId: string;
|
|
36
|
+
/**
|
|
37
|
+
* The set of tokens addresses associated with the chain.
|
|
38
|
+
*/
|
|
39
|
+
tokens: string[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Definition of an action that can be performed by the Ember plugin.
|
|
43
|
+
*/
|
|
44
|
+
export interface ActionDefinition<T extends Action> {
|
|
45
|
+
/**
|
|
46
|
+
* The name for the action, should be unique across all actions in the plugin.
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
* The action type
|
|
51
|
+
*/
|
|
52
|
+
type: T;
|
|
53
|
+
/**
|
|
54
|
+
* The callback function to execute when the action is triggered.
|
|
55
|
+
*/
|
|
56
|
+
callback: ActionCallback<T>;
|
|
57
|
+
/**
|
|
58
|
+
* This function returns the possible input tokens for the action in all chains.
|
|
59
|
+
* @returns The list of token sets that can be used as input for the action.
|
|
60
|
+
*/
|
|
61
|
+
inputTokens: () => Promise<TokenSet[]>;
|
|
62
|
+
/**
|
|
63
|
+
* This function returns the possible output tokens for the action in all chains.
|
|
64
|
+
* If not provided, all input input token sets will be considered possible output sets.
|
|
65
|
+
* @returns The list of tokens that can be used as output for the action.
|
|
66
|
+
*/
|
|
67
|
+
outputTokens?: () => Promise<TokenSet[]>;
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,iBAAiB,EACjB,6BAA6B,EAC7B,oCAAoC,EACpC,qCAAqC,EACtC,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,cAAc,GAAG,gBAAgB,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAEzF;;GAEG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,kBAAkB,CAAC;IACzB,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,eAAe,EAAE,0BAA0B,CAAC;IAC5C,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,kBAAkB,EAAE,uBAAuB,CAAC;IAC5C,kBAAkB,EAAE,uBAAuB,CAAC;IAC5C,oBAAoB,EAAE,yBAAyB,CAAC;IAChD,kBAAkB,EAAE,qCAAqC,CAAC;IAC1D,iBAAiB,EAAE,oCAAoC,CAAC;IACxD,kBAAkB,EAAE,6BAA6B,CAAC;CACnD,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM;IAChD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IACR;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5B;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/actions/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ActionDefinition } from './actions/index.js';
|
|
2
|
+
import type { AvailableActions, AvailableQueries, PluginType } from './pluginType.js';
|
|
3
|
+
export interface EmberPlugin<Type extends PluginType> {
|
|
4
|
+
/**
|
|
5
|
+
* The unique identifier for the plugin.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The type of the plugin, which determines the actions and queries it supports.
|
|
10
|
+
*/
|
|
11
|
+
type: Type;
|
|
12
|
+
/**
|
|
13
|
+
* The possible actions that the plugin can perform.
|
|
14
|
+
*/
|
|
15
|
+
actions: ActionDefinition<AvailableActions[Type]>[];
|
|
16
|
+
/**
|
|
17
|
+
* The metadata getters that the plugin can provide.
|
|
18
|
+
*/
|
|
19
|
+
queries: AvailableQueries[Type];
|
|
20
|
+
/**
|
|
21
|
+
* The name of the plugin.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* An optional description of the plugin.
|
|
26
|
+
*/
|
|
27
|
+
description?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The twitter URL for the plugin or its creator.
|
|
30
|
+
*/
|
|
31
|
+
x?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The website URL for the plugin or its creator.
|
|
34
|
+
*/
|
|
35
|
+
website?: string;
|
|
36
|
+
}
|
|
37
|
+
export * from './actions/index.js';
|
|
38
|
+
export * from './queries/index.js';
|
|
39
|
+
export * from './pluginType.js';
|
|
40
|
+
export * from './schemas/index.js';
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEtF,MAAM,WAAW,WAAW,CAAC,IAAI,SAAS,UAAU;IAClD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IACpD;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAsCA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LendingActions, LiquidityActions, PerpetualsActions, SwapActions } from './actions/index.js';
|
|
2
|
+
import type { LendingQueries, LiquidityQueries, PerpetualsQueries } from './queries/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The type of actions and queries the plugin supports.
|
|
5
|
+
*/
|
|
6
|
+
export type PluginType = 'lending' | 'liquidity' | 'swap' | 'perpetuals';
|
|
7
|
+
/**
|
|
8
|
+
* The possible actions an ember plugin can perform.
|
|
9
|
+
*/
|
|
10
|
+
export type AvailableActions = {
|
|
11
|
+
lending: LendingActions;
|
|
12
|
+
liquidity: LiquidityActions;
|
|
13
|
+
swap: SwapActions;
|
|
14
|
+
perpetuals: PerpetualsActions;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The possible queries an ember plugin can perform.
|
|
18
|
+
*/
|
|
19
|
+
export type AvailableQueries = {
|
|
20
|
+
lending: LendingQueries;
|
|
21
|
+
liquidity: LiquidityQueries;
|
|
22
|
+
swap: Record<string, never> | undefined;
|
|
23
|
+
perpetuals: PerpetualsQueries;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=pluginType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginType.d.ts","sourceRoot":"","sources":["../../src/core/pluginType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,iBAAiB,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,iBAAiB,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginType.js","sourceRoot":"","sources":["../../src/core/pluginType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GetWalletLendingPositionsRequest, GetWalletLendingPositionsResponse } from '../schemas/lending.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get lending positions for a wallet.
|
|
4
|
+
*/
|
|
5
|
+
export type LendingGetPositions = (request: GetWalletLendingPositionsRequest) => Promise<GetWalletLendingPositionsResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* All the queries related to lending.
|
|
8
|
+
*/
|
|
9
|
+
export type LendingQueries = {
|
|
10
|
+
getPositions: LendingGetPositions;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=lending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lending.d.ts","sourceRoot":"","sources":["../../../src/core/queries/lending.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gCAAgC,KACtC,OAAO,CAAC,iCAAiC,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,mBAAmB,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lending.js","sourceRoot":"","sources":["../../../src/core/queries/lending.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GetLiquidityPoolsResponse, GetWalletLiquidityPositionsRequest, GetWalletLiquidityPositionsResponse } from '../schemas/liquidity.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get liquidity positions for a wallet.
|
|
4
|
+
*/
|
|
5
|
+
export type LiquidityGetWalletPositions = (request: GetWalletLiquidityPositionsRequest) => Promise<GetWalletLiquidityPositionsResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* Get all liquidity pools.
|
|
8
|
+
*/
|
|
9
|
+
export type LiquidityGetPools = () => Promise<GetLiquidityPoolsResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* All the queries related to liquidity.
|
|
12
|
+
*/
|
|
13
|
+
export type LiquidityQueries = {
|
|
14
|
+
getWalletPositions: LiquidityGetWalletPositions;
|
|
15
|
+
getPools: LiquidityGetPools;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=liquidity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity.d.ts","sourceRoot":"","sources":["../../../src/core/queries/liquidity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,kCAAkC,KACxC,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kBAAkB,EAAE,2BAA2B,CAAC;IAChD,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidity.js","sourceRoot":"","sources":["../../../src/core/queries/liquidity.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GetPerpetualsMarketsOrdersRequest, GetPerpetualsMarketsOrdersResponse, GetPerpetualsMarketsPositionsRequest, GetPerpetualsMarketsPositionsResponse, GetPerpetualsMarketsRequest, GetPerpetualsMarketsResponse } from '../schemas/perpetuals.js';
|
|
2
|
+
export type PerpetualsGetMarkets = (request: GetPerpetualsMarketsRequest) => Promise<GetPerpetualsMarketsResponse>;
|
|
3
|
+
export type PerpetualsGetPositions = (request: GetPerpetualsMarketsPositionsRequest) => Promise<GetPerpetualsMarketsPositionsResponse>;
|
|
4
|
+
export type PerpetualsGetOrders = (request: GetPerpetualsMarketsOrdersRequest) => Promise<GetPerpetualsMarketsOrdersResponse>;
|
|
5
|
+
export type PerpetualsQueries = {
|
|
6
|
+
getMarkets: PerpetualsGetMarkets;
|
|
7
|
+
getPositions: PerpetualsGetPositions;
|
|
8
|
+
getOrders: PerpetualsGetOrders;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=perpetuals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perpetuals.d.ts","sourceRoot":"","sources":["../../../src/core/queries/perpetuals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,kCAAkC,EAClC,oCAAoC,EACpC,qCAAqC,EACrC,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,2BAA2B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAE3C,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,oCAAoC,KAC1C,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,iCAAiC,KACvC,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,oBAAoB,CAAC;IACjC,YAAY,EAAE,sBAAsB,CAAC;IACrC,SAAS,EAAE,mBAAmB,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perpetuals.js","sourceRoot":"","sources":["../../../src/core/queries/perpetuals.ts"],"names":[],"mappings":""}
|