@reyaxyz/api-sdk 0.46.0 → 0.46.2
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/clients/modules/deposit-existing-MA.simulation/index.js +1 -1
- package/dist/clients/modules/deposit-existing-MA.simulation/index.js.map +1 -1
- package/dist/clients/modules/deposit-existing-MA.simulation/types.js.map +1 -1
- package/dist/clients/types.js +1 -0
- package/dist/clients/types.js.map +1 -1
- package/dist/types/clients/modules/deposit-existing-MA.simulation/types.d.ts +1 -1
- package/dist/types/clients/modules/deposit-existing-MA.simulation/types.d.ts.map +1 -1
- package/dist/types/clients/types.d.ts +1 -0
- package/dist/types/clients/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/clients/modules/deposit-existing-MA.simulation/index.ts +1 -1
- package/src/clients/modules/deposit-existing-MA.simulation/types.ts +1 -1
- package/src/clients/types.ts +1 -0
|
@@ -71,7 +71,7 @@ var DepositExistingMASimulationClient = /** @class */ (function () {
|
|
|
71
71
|
});
|
|
72
72
|
var result = {
|
|
73
73
|
fees: fees.fees,
|
|
74
|
-
|
|
74
|
+
feesUnderlyingToken: fees.feesUnderlyingToken,
|
|
75
75
|
bridgeTimeInMS: bridgeTimeInMS,
|
|
76
76
|
marginRatio: simulateEditCollateralEntity.marginRatio,
|
|
77
77
|
marginRatioHealth: simulateEditCollateralEntity.marginRatioHealth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/deposit-existing-MA.simulation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4E;AAQ5E;IAEE,2CAAY,oBAA0C;QACpD,oBAAoB;QACpB,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED,wDAAwD;IAClD,+CAAG,GAAT,UAAU,MAAiD;;;;4BACzD,qBAAM,IAAI,CAAC,oBAAoB,CA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ClC,CAAC,CAAC;QAEH,IAAM,cAAc,GAAG,IAAA,4BAAmB,EAAC;YACzC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC,CAAC,cAAc,CAAC;QAElB,IAAM,IAAI,GAAG,IAAA,6BAAoB,EAAC;YAChC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC,CAAC;QAEH,IAAM,MAAM,GAAoC;YAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,cAAc,EAAE,cAAc;YAC9B,WAAW,EAAE,4BAA4B,CAAC,WAAW;YACrD,iBAAiB,EAAE,4BAA4B,CAAC,iBAAiB;SAClE,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,wCAAC;AAAD,CAAC,AAzCD,IAyCC","sourcesContent":["import { getSocketBridgeTime, getSocketDepositFees } from '@reyaxyz/common';\nimport EditCollateralClient from '../edit-collateral.simulation';\nimport {\n DepositExistingMASimulationLoadDataParams,\n DepositExistingMASimulationSimulateParams,\n SimulateDepositExistingMAEntity,\n} from './types';\n\nexport default class DepositExistingMASimulationClient {\n private editCollateralClient: EditCollateralClient;\n constructor(editCollateralClient: EditCollateralClient) {\n // Constructor added\n this.editCollateralClient = editCollateralClient;\n }\n\n // Method to asynchronously load data based on accountId\n async arm(params: DepositExistingMASimulationLoadDataParams): Promise<void> {\n await this.editCollateralClient.arm({\n marginAccountId: params.marginAccountId,\n });\n }\n\n // Synchronous method to simulate operations based on an amount\n simulate(\n params: DepositExistingMASimulationSimulateParams,\n ): SimulateDepositExistingMAEntity {\n const simulateEditCollateralEntity = this.editCollateralClient.simulate({\n signedAmount: params.amount,\n tokenAddress: params.tokenAddress,\n });\n\n const bridgeTimeInMS = getSocketBridgeTime({\n moneyInOutChainId: params.moneyInOutChainId,\n }).bridgeTimeInMS;\n\n const fees = getSocketDepositFees({\n moneyInOutChainId: params.moneyInOutChainId,\n });\n\n const result: SimulateDepositExistingMAEntity = {\n fees: fees.fees,\n feesUnderlyingToken: fees.feesUnderlyingToken,\n bridgeTimeInMS: bridgeTimeInMS,\n marginRatio: simulateEditCollateralEntity.marginRatio,\n marginRatioHealth: simulateEditCollateralEntity.marginRatioHealth,\n };\n\n return result;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/deposit-existing-MA.simulation/types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n MarginAccountEntity,\n MoneyInOutChainId,\n TokenEntity,\n} from '@reyaxyz/common';\nimport { EditCollateralSimulationLoadDataParams } from '../edit-collateral.simulation/types';\n\nexport type DepositExistingMASimulationLoadDataParams =\n EditCollateralSimulationLoadDataParams;\n\nexport type DepositExistingMASimulationSimulateParams = {\n moneyInOutChainId: MoneyInOutChainId;\n amount: number;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type SimulateDepositExistingMAEntity = {\n fees: number;\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/deposit-existing-MA.simulation/types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n MarginAccountEntity,\n MoneyInOutChainId,\n TokenEntity,\n} from '@reyaxyz/common';\nimport { EditCollateralSimulationLoadDataParams } from '../edit-collateral.simulation/types';\n\nexport type DepositExistingMASimulationLoadDataParams =\n EditCollateralSimulationLoadDataParams;\n\nexport type DepositExistingMASimulationSimulateParams = {\n moneyInOutChainId: MoneyInOutChainId;\n amount: number;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type SimulateDepositExistingMAEntity = {\n fees: number;\n feesUnderlyingToken: string;\n bridgeTimeInMS: number;\n marginRatio: MarginAccountEntity['marginRatioPercentage'];\n marginRatioHealth: MarginAccountEntity['marginRatioHealth'];\n};\n"]}
|
package/dist/clients/types.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./modules/lp/types"), exports);
|
|
|
29
29
|
__exportStar(require("./modules/markets/types"), exports);
|
|
30
30
|
__exportStar(require("./modules/tokens/types"), exports);
|
|
31
31
|
__exportStar(require("./modules/trade.simulation/types"), exports);
|
|
32
|
+
__exportStar(require("./modules/owner/types"), exports);
|
|
32
33
|
__exportStar(require("./modules/deposit-existing-MA.simulation/types"), exports);
|
|
33
34
|
__exportStar(require("./modules/deposit-new-MA.simulation/types"), exports);
|
|
34
35
|
__exportStar(require("./modules/edit-collateral.simulation/types"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CAyByB;AAvBvB,2GAAA,iBAAiB,OAAA;AAYjB,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AAGjB,8GAAA,oBAAoB,OAAA;AACpB,yHAAA,+BAA+B,OAAA;AAE/B,oIAAA,0CAA0C,OAAA;AAG1C,6HAAA,mCAAmC,OAAA;AAErC,0DAAwC;AACxC,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,iFAA+D;AAC/D,4EAA0D;AAC1D,6EAA2D","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n PositionHistoryEntity,\n PositionEntity,\n TransactionHistoryType,\n MarginAccountTransactionHistoryType,\n MarginAccountTransactionHistoryEntity,\n MarginAccountEntity,\n LpPositionEntity,\n LpPoolEntity,\n ReyaChainId,\n MoneyInOutChainId,\n GetLpPoolPerformanceChartDataResult,\n GetLpPoolBalanceChartDataResult,\n LpBalanceGranularity,\n MarginAccountBalanceGranularity,\n GetMarginAccountBalanceChartDataResult,\n MarginAccountCollateralsBalanceGranularity,\n GetMarginAccountCollateralsBalanceChartDataResult,\n GetAllMarginAccountsBalanceChartDataResult,\n AllMarginAccountsBalanceGranularity,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/lp/types';\nexport * from './modules/markets/types';\nexport * from './modules/tokens/types';\nexport * from './modules/trade.simulation/types';\nexport * from './modules/deposit-existing-MA.simulation/types';\nexport * from './modules/deposit-new-MA.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CAyByB;AAvBvB,2GAAA,iBAAiB,OAAA;AAYjB,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AAGjB,8GAAA,oBAAoB,OAAA;AACpB,yHAAA,+BAA+B,OAAA;AAE/B,oIAAA,0CAA0C,OAAA;AAG1C,6HAAA,mCAAmC,OAAA;AAErC,0DAAwC;AACxC,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,wDAAsC;AACtC,iFAA+D;AAC/D,4EAA0D;AAC1D,6EAA2D","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n PositionHistoryEntity,\n PositionEntity,\n TransactionHistoryType,\n MarginAccountTransactionHistoryType,\n MarginAccountTransactionHistoryEntity,\n MarginAccountEntity,\n LpPositionEntity,\n LpPoolEntity,\n ReyaChainId,\n MoneyInOutChainId,\n GetLpPoolPerformanceChartDataResult,\n GetLpPoolBalanceChartDataResult,\n LpBalanceGranularity,\n MarginAccountBalanceGranularity,\n GetMarginAccountBalanceChartDataResult,\n MarginAccountCollateralsBalanceGranularity,\n GetMarginAccountCollateralsBalanceChartDataResult,\n GetAllMarginAccountsBalanceChartDataResult,\n AllMarginAccountsBalanceGranularity,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/lp/types';\nexport * from './modules/markets/types';\nexport * from './modules/tokens/types';\nexport * from './modules/trade.simulation/types';\nexport * from './modules/owner/types';\nexport * from './modules/deposit-existing-MA.simulation/types';\nexport * from './modules/deposit-new-MA.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\n"]}
|
|
@@ -8,7 +8,7 @@ export type DepositExistingMASimulationSimulateParams = {
|
|
|
8
8
|
};
|
|
9
9
|
export type SimulateDepositExistingMAEntity = {
|
|
10
10
|
fees: number;
|
|
11
|
-
|
|
11
|
+
feesUnderlyingToken: string;
|
|
12
12
|
bridgeTimeInMS: number;
|
|
13
13
|
marginRatio: MarginAccountEntity['marginRatioPercentage'];
|
|
14
14
|
marginRatioHealth: MarginAccountEntity['marginRatioHealth'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/deposit-existing-MA.simulation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sCAAsC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,MAAM,yCAAyC,GACnD,sCAAsC,CAAC;AAEzC,MAAM,MAAM,yCAAyC,GAAG;IACtD,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/deposit-existing-MA.simulation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sCAAsC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,MAAM,yCAAyC,GACnD,sCAAsC,CAAC;AAEzC,MAAM,MAAM,yCAAyC,GAAG;IACtD,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;IAC1D,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;CAC7D,CAAC"}
|
|
@@ -4,6 +4,7 @@ export * from './modules/lp/types';
|
|
|
4
4
|
export * from './modules/markets/types';
|
|
5
5
|
export * from './modules/tokens/types';
|
|
6
6
|
export * from './modules/trade.simulation/types';
|
|
7
|
+
export * from './modules/owner/types';
|
|
7
8
|
export * from './modules/deposit-existing-MA.simulation/types';
|
|
8
9
|
export * from './modules/deposit-new-MA.simulation/types';
|
|
9
10
|
export * from './modules/edit-collateral.simulation/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,mCAAmC,EACnC,qCAAqC,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mCAAmC,EACnC,+BAA+B,EAC/B,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,mCAAmC,GACpC,MAAM,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,mCAAmC,EACnC,qCAAqC,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mCAAmC,EACnC,+BAA+B,EAC/B,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,mCAAmC,GACpC,MAAM,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/api-sdk",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@reyaxyz/common": "0.23.
|
|
36
|
+
"@reyaxyz/common": "0.23.1",
|
|
37
37
|
"axios": "^1.6.2",
|
|
38
38
|
"bignumber.js": "^9.1.2"
|
|
39
39
|
},
|
|
40
40
|
"packageManager": "pnpm@8.10.4",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "19d64d92c95a8a5e376f1e2e9be0c9f1f4745e5c"
|
|
42
42
|
}
|
|
@@ -39,7 +39,7 @@ export default class DepositExistingMASimulationClient {
|
|
|
39
39
|
|
|
40
40
|
const result: SimulateDepositExistingMAEntity = {
|
|
41
41
|
fees: fees.fees,
|
|
42
|
-
|
|
42
|
+
feesUnderlyingToken: fees.feesUnderlyingToken,
|
|
43
43
|
bridgeTimeInMS: bridgeTimeInMS,
|
|
44
44
|
marginRatio: simulateEditCollateralEntity.marginRatio,
|
|
45
45
|
marginRatioHealth: simulateEditCollateralEntity.marginRatioHealth,
|
|
@@ -16,7 +16,7 @@ export type DepositExistingMASimulationSimulateParams = {
|
|
|
16
16
|
|
|
17
17
|
export type SimulateDepositExistingMAEntity = {
|
|
18
18
|
fees: number;
|
|
19
|
-
|
|
19
|
+
feesUnderlyingToken: string;
|
|
20
20
|
bridgeTimeInMS: number;
|
|
21
21
|
marginRatio: MarginAccountEntity['marginRatioPercentage'];
|
|
22
22
|
marginRatioHealth: MarginAccountEntity['marginRatioHealth'];
|
package/src/clients/types.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './modules/lp/types';
|
|
|
30
30
|
export * from './modules/markets/types';
|
|
31
31
|
export * from './modules/tokens/types';
|
|
32
32
|
export * from './modules/trade.simulation/types';
|
|
33
|
+
export * from './modules/owner/types';
|
|
33
34
|
export * from './modules/deposit-existing-MA.simulation/types';
|
|
34
35
|
export * from './modules/deposit-new-MA.simulation/types';
|
|
35
36
|
export * from './modules/edit-collateral.simulation/types';
|