@reyaxyz/api-sdk 0.46.0 → 0.46.1

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.
@@ -71,7 +71,7 @@ var DepositExistingMASimulationClient = /** @class */ (function () {
71
71
  });
72
72
  var result = {
73
73
  fees: fees.fees,
74
- feesUnit: fees.feesUnit,
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,CAAC,GAAG,CAAC;4BAClC,eAAe,EAAE,MAAM,CAAC,eAAe;yBACxC,CAAC,EAAA;;wBAFF,SAEE,CAAC;;;;;KACJ;IAED,+DAA+D;IAC/D,oDAAQ,GAAR,UACE,MAAiD;QAEjD,IAAM,4BAA4B,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;YACtE,YAAY,EAAE,MAAM,CAAC,MAAM;YAC3B,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC,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,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,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 feesUnit: fees.feesUnit,\n bridgeTimeInMS: bridgeTimeInMS,\n marginRatio: simulateEditCollateralEntity.marginRatio,\n marginRatioHealth: simulateEditCollateralEntity.marginRatioHealth,\n };\n\n return result;\n }\n}\n"]}
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,CAAC,GAAG,CAAC;4BAClC,eAAe,EAAE,MAAM,CAAC,eAAe;yBACxC,CAAC,EAAA;;wBAFF,SAEE,CAAC;;;;;KACJ;IAED,+DAA+D;IAC/D,oDAAQ,GAAR,UACE,MAAiD;QAEjD,IAAM,4BAA4B,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;YACtE,YAAY,EAAE,MAAM,CAAC,MAAM;YAC3B,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC,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 feesUnit: string;\n bridgeTimeInMS: number;\n marginRatio: MarginAccountEntity['marginRatioPercentage'];\n marginRatioHealth: MarginAccountEntity['marginRatioHealth'];\n};\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"]}
@@ -8,7 +8,7 @@ export type DepositExistingMASimulationSimulateParams = {
8
8
  };
9
9
  export type SimulateDepositExistingMAEntity = {
10
10
  fees: number;
11
- feesUnit: string;
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,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;IAC1D,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;CAC7D,CAAC"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/api-sdk",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
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.0",
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": "d843391ba86bf99e95c85a8fb3805dce4bb19209"
41
+ "gitHead": "65f3be42b0110c2d3c4abc373cdd55cc8251665e"
42
42
  }
@@ -39,7 +39,7 @@ export default class DepositExistingMASimulationClient {
39
39
 
40
40
  const result: SimulateDepositExistingMAEntity = {
41
41
  fees: fees.fees,
42
- feesUnit: fees.feesUnit,
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
- feesUnit: string;
19
+ feesUnderlyingToken: string;
20
20
  bridgeTimeInMS: number;
21
21
  marginRatio: MarginAccountEntity['marginRatioPercentage'];
22
22
  marginRatioHealth: MarginAccountEntity['marginRatioHealth'];