@reyaxyz/api-sdk 0.146.0 → 0.147.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CA8ByB;AA5BvB,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;AAEnC,uHAAA,6BAA6B,OAAA;AAG7B,8GAAA,oBAAoB,OAAA;AAEtB,0DAAwC;AACxC,qEAAmD;AACnD,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,wDAAsC;AACtC,iFAA+D;AAC/D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,yEAAuD;AACvD,mFAAiE;AACjE,yFAAuE;AACvE,8EAA4D;AAC5D,+DAA6C;AAC7C,yEAAuD;AACvD,kFAAgE;AAChE,4EAA0D;AAC1D,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n OrderHistoryEntity,\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 GetFundingRateChartDataResult,\n FundingRateHistoryGranularity,\n MoneyInOutConfigurationPerTokenName,\n UnifiedConditionalOrderType,\n ConditionalOrderType,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/conditional-orders/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/deposit-passive-pool.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\nexport * from './modules/withdraw-MA.simulation/types';\nexport * from './modules/withdraw-passive-pool.simulation/types';\nexport * from './modules/transfer-margin-between-MAs.simulation/types';\nexport * from './modules/transfer-MA-Pool.simulation/types';\nexport * from './modules/funding-rate/types';\nexport * from './modules/depth-chart.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/isolated-order.simulation/types';\nexport * from './modules/rage-trade/types';\nexport * from './modules/lottery/types';\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CA8ByB;AA5BvB,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;AAEnC,uHAAA,6BAA6B,OAAA;AAG7B,8GAAA,oBAAoB,OAAA;AAEtB,0DAAwC;AACxC,qEAAmD;AACnD,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,wDAAsC;AACtC,iFAA+D;AAC/D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,yEAAuD;AACvD,mFAAiE;AACjE,yFAAuE;AACvE,8EAA4D;AAC5D,+DAA6C;AAC7C,yEAAuD;AACvD,kFAAgE;AAChE,4EAA0D;AAC1D,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n OrderHistoryEntity,\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 GetFundingRateChartDataResult,\n FundingRateHistoryGranularity,\n MoneyInOutConfigurationPerTokenName,\n UnifiedConditionalOrderType,\n ConditionalOrderType,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/conditional-orders/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/deposit-passive-pool.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\nexport * from './modules/withdraw-MA.simulation/types';\nexport * from './modules/withdraw-passive-pool.simulation/types';\nexport * from './modules/transfer-margin-between-MAs.simulation/types';\nexport * from './modules/transfer-MA-Pool.simulation/types';\nexport * from './modules/funding-rate/types';\nexport * from './modules/depth-chart.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/isolated-order.simulation/types';\nexport * from './modules/rage-trade/types';\nexport * from './modules/lottery/types';\n"]}
|
|
@@ -20,18 +20,4 @@ export * from './modules/deposit-passive-pool.simulation/types';
|
|
|
20
20
|
export * from './modules/isolated-order.simulation/types';
|
|
21
21
|
export * from './modules/rage-trade/types';
|
|
22
22
|
export * from './modules/lottery/types';
|
|
23
|
-
import { TradingQueries, type Prisma } from '@reyaxyz/database';
|
|
24
|
-
import type { Req } from '@reyaxyz/common';
|
|
25
|
-
type Stringified<T> = T extends Prisma.Decimal | bigint ? string : T extends (infer U)[] ? Stringified<U>[] : {
|
|
26
|
-
[K in keyof T]: Stringified<T[K]>;
|
|
27
|
-
};
|
|
28
|
-
type RequestParams<R> = R extends Req ? Req['params'] : never;
|
|
29
|
-
type RequestQuery<R> = R extends Req ? Req['query'] : never;
|
|
30
|
-
export type TradingApi = {
|
|
31
|
-
[K in keyof typeof TradingQueries as K extends `get${infer R}` ? R : K]: {
|
|
32
|
-
params: RequestParams<Parameters<ReturnType<(typeof TradingQueries)[K]>>[0]>;
|
|
33
|
-
query: RequestQuery<Parameters<ReturnType<(typeof TradingQueries)[K]>>[0]>;
|
|
34
|
-
response: Stringified<Awaited<ReturnType<ReturnType<(typeof TradingQueries)[K]>>>>;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
23
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,kBAAkB,EAClB,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,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M,iBAAiB,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,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,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/api-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.147.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@reyaxyz/common": "0.
|
|
36
|
+
"@reyaxyz/common": "0.240.0",
|
|
37
37
|
"@simplewebauthn/types": "^10.0.0",
|
|
38
38
|
"axios": "^1.6.2",
|
|
39
39
|
"bignumber.js": "^9.1.2",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"ws": "^8.16.0"
|
|
43
43
|
},
|
|
44
44
|
"packageManager": "pnpm@8.3.1",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "eb5116fae5fe983da3e10bc0f98bf33754ff50e5",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@reyaxyz/database": "0.
|
|
47
|
+
"@reyaxyz/database": "0.112.0"
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/clients/types.ts
CHANGED
|
@@ -51,26 +51,3 @@ export * from './modules/deposit-passive-pool.simulation/types';
|
|
|
51
51
|
export * from './modules/isolated-order.simulation/types';
|
|
52
52
|
export * from './modules/rage-trade/types';
|
|
53
53
|
export * from './modules/lottery/types';
|
|
54
|
-
|
|
55
|
-
import { TradingQueries, type Prisma } from '@reyaxyz/database';
|
|
56
|
-
import type { Req } from '@reyaxyz/common';
|
|
57
|
-
|
|
58
|
-
type Stringified<T> = T extends Prisma.Decimal | bigint
|
|
59
|
-
? string
|
|
60
|
-
: T extends (infer U)[]
|
|
61
|
-
? Stringified<U>[]
|
|
62
|
-
: { [K in keyof T]: Stringified<T[K]> };
|
|
63
|
-
|
|
64
|
-
type RequestParams<R> = R extends Req ? Req['params'] : never;
|
|
65
|
-
type RequestQuery<R> = R extends Req ? Req['query'] : never;
|
|
66
|
-
export type TradingApi = {
|
|
67
|
-
[K in keyof typeof TradingQueries as K extends `get${infer R}` ? R : K]: {
|
|
68
|
-
params: RequestParams<
|
|
69
|
-
Parameters<ReturnType<(typeof TradingQueries)[K]>>[0]
|
|
70
|
-
>;
|
|
71
|
-
query: RequestQuery<Parameters<ReturnType<(typeof TradingQueries)[K]>>[0]>;
|
|
72
|
-
response: Stringified<
|
|
73
|
-
Awaited<ReturnType<ReturnType<(typeof TradingQueries)[K]>>>
|
|
74
|
-
>;
|
|
75
|
-
};
|
|
76
|
-
};
|