@proton/wrap-constants 0.2.135 → 0.2.137
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.d.ts +51 -4
- package/dist/index.js +21 -2
- package/dist/index.mjs +19 -2
- package/package.json +2 -2
- package/src/parsers/dex.ts +25 -2
package/dist/index.d.ts
CHANGED
|
@@ -6360,6 +6360,8 @@ declare const wrapParser: z.ZodObject<{
|
|
|
6360
6360
|
}>;
|
|
6361
6361
|
declare type Wrap = z.infer<typeof wrapParser>;
|
|
6362
6362
|
|
|
6363
|
+
declare const sortDirectionEnum: z.ZodEnum<["asc", "desc"]>;
|
|
6364
|
+
declare type SortDirection = z.input<typeof sortDirectionEnum>;
|
|
6363
6365
|
/**
|
|
6364
6366
|
* OHLCV
|
|
6365
6367
|
*/
|
|
@@ -10491,7 +10493,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10491
10493
|
account_seq_to: z.ZodOptional<z.ZodString>;
|
|
10492
10494
|
date_from: z.ZodOptional<z.ZodString>;
|
|
10493
10495
|
date_to: z.ZodOptional<z.ZodString>;
|
|
10494
|
-
direction: z.ZodOptional<z.
|
|
10496
|
+
direction: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
10495
10497
|
limit: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, number | undefined>;
|
|
10496
10498
|
}, "strip", z.ZodTypeAny, {
|
|
10497
10499
|
account: string;
|
|
@@ -10501,7 +10503,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10501
10503
|
account_seq_to?: string | undefined;
|
|
10502
10504
|
date_from?: string | undefined;
|
|
10503
10505
|
date_to?: string | undefined;
|
|
10504
|
-
direction?:
|
|
10506
|
+
direction?: "asc" | "desc" | undefined;
|
|
10505
10507
|
}, {
|
|
10506
10508
|
account: string;
|
|
10507
10509
|
contract_filters?: string | string[] | undefined;
|
|
@@ -10509,7 +10511,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10509
10511
|
account_seq_to?: string | undefined;
|
|
10510
10512
|
date_from?: string | undefined;
|
|
10511
10513
|
date_to?: string | undefined;
|
|
10512
|
-
direction?:
|
|
10514
|
+
direction?: "asc" | "desc" | undefined;
|
|
10513
10515
|
limit?: number | undefined;
|
|
10514
10516
|
}>;
|
|
10515
10517
|
declare type GetHistoryActions = z.input<typeof getHistoryActionsParser>;
|
|
@@ -11126,6 +11128,51 @@ declare const getHistoryActionsResponseParser: z.ZodObject<{
|
|
|
11126
11128
|
last_irreversible_block_num: number;
|
|
11127
11129
|
}>;
|
|
11128
11130
|
declare type GetHistoryActionsResponse = z.infer<typeof getHistoryActionsResponseParser>;
|
|
11131
|
+
/**
|
|
11132
|
+
* History transfers
|
|
11133
|
+
*/
|
|
11134
|
+
declare const getHistoryTransfersParser: z.ZodObject<{
|
|
11135
|
+
transfer_from: z.ZodOptional<z.ZodString>;
|
|
11136
|
+
transfer_to: z.ZodOptional<z.ZodString>;
|
|
11137
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
11138
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
11139
|
+
amount_min: z.ZodOptional<z.ZodString>;
|
|
11140
|
+
amount_max: z.ZodOptional<z.ZodString>;
|
|
11141
|
+
date_from: z.ZodOptional<z.ZodString>;
|
|
11142
|
+
date_to: z.ZodOptional<z.ZodString>;
|
|
11143
|
+
global_seq_from: z.ZodOptional<z.ZodString>;
|
|
11144
|
+
global_seq_to: z.ZodOptional<z.ZodString>;
|
|
11145
|
+
direction: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
11146
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, number | undefined>;
|
|
11147
|
+
}, "strip", z.ZodTypeAny, {
|
|
11148
|
+
limit: number;
|
|
11149
|
+
transfer_from?: string | undefined;
|
|
11150
|
+
transfer_to?: string | undefined;
|
|
11151
|
+
contract?: string | undefined;
|
|
11152
|
+
symbol?: string | undefined;
|
|
11153
|
+
amount_min?: string | undefined;
|
|
11154
|
+
amount_max?: string | undefined;
|
|
11155
|
+
date_from?: string | undefined;
|
|
11156
|
+
date_to?: string | undefined;
|
|
11157
|
+
global_seq_from?: string | undefined;
|
|
11158
|
+
global_seq_to?: string | undefined;
|
|
11159
|
+
direction?: "asc" | "desc" | undefined;
|
|
11160
|
+
}, {
|
|
11161
|
+
transfer_from?: string | undefined;
|
|
11162
|
+
transfer_to?: string | undefined;
|
|
11163
|
+
contract?: string | undefined;
|
|
11164
|
+
symbol?: string | undefined;
|
|
11165
|
+
amount_min?: string | undefined;
|
|
11166
|
+
amount_max?: string | undefined;
|
|
11167
|
+
date_from?: string | undefined;
|
|
11168
|
+
date_to?: string | undefined;
|
|
11169
|
+
global_seq_from?: string | undefined;
|
|
11170
|
+
global_seq_to?: string | undefined;
|
|
11171
|
+
direction?: "asc" | "desc" | undefined;
|
|
11172
|
+
limit?: number | undefined;
|
|
11173
|
+
}>;
|
|
11174
|
+
declare type GetHistoryTransfers = z.input<typeof getHistoryTransfersParser>;
|
|
11175
|
+
declare type GetHistoryTransfersParsed = z.output<typeof getHistoryTransfersParser>;
|
|
11129
11176
|
/**
|
|
11130
11177
|
* Basic Types
|
|
11131
11178
|
*/
|
|
@@ -12172,4 +12219,4 @@ declare const isInputInvalid: (data: string, value: string | number, pool: {
|
|
|
12172
12219
|
}) => boolean;
|
|
12173
12220
|
declare const applyDiscountToFee: (fee: number, staked: number) => number;
|
|
12174
12221
|
|
|
12175
|
-
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats, Daily, DbHistoryTransaction, DbMarket, DepositBody, Depth, ExchangeRate, ExchangeRates, ExtendedAsset, ExtendedAssetParser, ExtendedToken, ExtendedTokenWithRate, FEE_FACTOR, GenerateAddressBody, GenerateAddressResponse, GenerateAuth, GenerateAuthBaseAction, GetDailyResponse, GetDepth, GetDepthParsed, GetDepthResponse, GetHistoryActions, GetHistoryActionsParsed, GetHistoryActionsResponse, GetHistoryTransactionResponse, GetLeaderboard, GetLeaderboardParsed, GetLeaderboardResponse, GetMarketsResponse, GetOHLCV, GetOHLCVParsed, GetOHLCVResponse, GetOpenOrders, GetOpenOrdersParsed, GetOpenOrdersResponse, GetOrderHistory, GetOrderHistoryParsed, GetOrderHistoryResponse, GetOrderLifecycle, GetOrderLifecycleParsed, GetOrderLifecycleResponse, GetReferralTotals, GetReferralTotalsParsed, GetReferralTotalsResponse, GetReferrals, GetReferralsParsed, GetReferralsResponse, GetSyncResponse, GetTradeHistory, GetTradeHistoryParsed, GetTradeHistoryResponse, GetTrades, GetTradesParsed, GetTradesResponse, Graph, HistoryAccountRamDelta, HistoryAct, HistoryAction, HistoryActionTrace, HistoryPartial, HistoryReceipt, HistoryTrace, HistoryTransaction, ILink, INode, ITopics, Leaderboard, LoginAccountParamsV3, Market, MetalTransaction, Networks, OHLCV, OpenOrder, OrderHistory, OrderLog, OtcOrderResponse, OtcQuoteBody, OtcQuoteResponse, Pool, PoolTable, PostSerializeOrder, PostSerializeOrderResponse, PostSubmitOrder, PostSubmitOrderResponse, Providers, Rate, RawPool, Referral, ReferralTotal, Status, Sync, TOPICS, Trade, TradeLog, Type, WRAP_AUTH_ACTION, WRAP_CONTRACT, Wallet, WithdrawBody, WithdrawBodyBaseAction, WithdrawHistoryMetalResponse, WithdrawHistoryMetalSwap, WithdrawMetalResponse, WithdrawalFeeQuote, Wrap, WrapSetConf, WrapStart, accountParser, accountRamDeltaParser, actParser, actionTraceParser, addressParser, applyDiscountToFee, authorizationParser, authorizationsParser, baseActionParser, baseActionSerializedParser, bloksRatesParser, compute_liquidity, compute_transfer, compute_transfer_curve, createAbstractAuthParser, dailyParser, dbHistoryTransactionParser, dbMarketParser, depositBodyParser, depthParser, exchangeRateParser, exchangeRatesParser, explorerLinkByChain, fillType, generateAddressBodyParser, generateAddressResponse, generateAuthParser, getDailyResponseParser, getDepthParser, getDepthResponseParser, getHistoryActionsParser, getHistoryActionsResponseParser, getHistoryTransactionResponseParser, getLeaderboardParser, getLeaderboardResponseParser, getMarketsResponseParser, getOhlcvParser, getOhlcvResponseParser, getOpenOrdersParser, getOpenOrdersResponseParser, getOrderHistoryParser, getOrderHistoryResponseParser, getOrderLifecycleParser, getOrderLifecycleResponseParser, getReferralTotalsParser, getReferralTotalsResponseParser, getReferralsParser, getReferralsResponseParser, getSyncResponseParser, getTradeHistoryParser, getTradeHistoryResponseParser, getTradesParser, getTradesResponseParser, historyActionParser, historyPartialParser, historyTransactionParser, initializeCoins, initializeConstants, isInputInvalid, isSameToken, leaderboardParser, logStatus, loginAccountParamsV3Parser, marketParser, median, metalTransactionParser, ohlcvParser, openOrderParser, orderHistoryParser, orderLogParser, orderSide, orderType, otcOrderResponseParser, otcQuoteBodyParser, otcQuoteResponseParser, postSerializeOrderParser, postSerializeOrderResponseParser, postSubmitOrderParser, postSubmitOrderResponseParser, protonExplorerTxUrl, rateParser, receiptParser, refferalParser, refferalTotalParser, similarChains, singleActionTransactionParser, syncParser, traceParser, tradeLogParser, tradeParser, webauthActionParser, withdrawBodyParser, withdrawHistoryMetalResponseParser, withdrawHistoryMetalSwapParser, withdrawMetalResponseParser, withdrawalFeeQuoteParser, wrapParser, wrapSetConfParser, wrapStartParser };
|
|
12222
|
+
export { Address, Authorization, Authorizations, BloksRate, BloksRates, Chains, Coin, CoinWallet, CurrencyStat, CurrencyStats, Daily, DbHistoryTransaction, DbMarket, DepositBody, Depth, ExchangeRate, ExchangeRates, ExtendedAsset, ExtendedAssetParser, ExtendedToken, ExtendedTokenWithRate, FEE_FACTOR, GenerateAddressBody, GenerateAddressResponse, GenerateAuth, GenerateAuthBaseAction, GetDailyResponse, GetDepth, GetDepthParsed, GetDepthResponse, GetHistoryActions, GetHistoryActionsParsed, GetHistoryActionsResponse, GetHistoryTransactionResponse, GetHistoryTransfers, GetHistoryTransfersParsed, GetLeaderboard, GetLeaderboardParsed, GetLeaderboardResponse, GetMarketsResponse, GetOHLCV, GetOHLCVParsed, GetOHLCVResponse, GetOpenOrders, GetOpenOrdersParsed, GetOpenOrdersResponse, GetOrderHistory, GetOrderHistoryParsed, GetOrderHistoryResponse, GetOrderLifecycle, GetOrderLifecycleParsed, GetOrderLifecycleResponse, GetReferralTotals, GetReferralTotalsParsed, GetReferralTotalsResponse, GetReferrals, GetReferralsParsed, GetReferralsResponse, GetSyncResponse, GetTradeHistory, GetTradeHistoryParsed, GetTradeHistoryResponse, GetTrades, GetTradesParsed, GetTradesResponse, Graph, HistoryAccountRamDelta, HistoryAct, HistoryAction, HistoryActionTrace, HistoryPartial, HistoryReceipt, HistoryTrace, HistoryTransaction, ILink, INode, ITopics, Leaderboard, LoginAccountParamsV3, Market, MetalTransaction, Networks, OHLCV, OpenOrder, OrderHistory, OrderLog, OtcOrderResponse, OtcQuoteBody, OtcQuoteResponse, Pool, PoolTable, PostSerializeOrder, PostSerializeOrderResponse, PostSubmitOrder, PostSubmitOrderResponse, Providers, Rate, RawPool, Referral, ReferralTotal, SortDirection, Status, Sync, TOPICS, Trade, TradeLog, Type, WRAP_AUTH_ACTION, WRAP_CONTRACT, Wallet, WithdrawBody, WithdrawBodyBaseAction, WithdrawHistoryMetalResponse, WithdrawHistoryMetalSwap, WithdrawMetalResponse, WithdrawalFeeQuote, Wrap, WrapSetConf, WrapStart, accountParser, accountRamDeltaParser, actParser, actionTraceParser, addressParser, applyDiscountToFee, authorizationParser, authorizationsParser, baseActionParser, baseActionSerializedParser, bloksRatesParser, compute_liquidity, compute_transfer, compute_transfer_curve, createAbstractAuthParser, dailyParser, dbHistoryTransactionParser, dbMarketParser, depositBodyParser, depthParser, exchangeRateParser, exchangeRatesParser, explorerLinkByChain, fillType, generateAddressBodyParser, generateAddressResponse, generateAuthParser, getDailyResponseParser, getDepthParser, getDepthResponseParser, getHistoryActionsParser, getHistoryActionsResponseParser, getHistoryTransactionResponseParser, getHistoryTransfersParser, getLeaderboardParser, getLeaderboardResponseParser, getMarketsResponseParser, getOhlcvParser, getOhlcvResponseParser, getOpenOrdersParser, getOpenOrdersResponseParser, getOrderHistoryParser, getOrderHistoryResponseParser, getOrderLifecycleParser, getOrderLifecycleResponseParser, getReferralTotalsParser, getReferralTotalsResponseParser, getReferralsParser, getReferralsResponseParser, getSyncResponseParser, getTradeHistoryParser, getTradeHistoryResponseParser, getTradesParser, getTradesResponseParser, historyActionParser, historyPartialParser, historyTransactionParser, initializeCoins, initializeConstants, isInputInvalid, isSameToken, leaderboardParser, logStatus, loginAccountParamsV3Parser, marketParser, median, metalTransactionParser, ohlcvParser, openOrderParser, orderHistoryParser, orderLogParser, orderSide, orderType, otcOrderResponseParser, otcQuoteBodyParser, otcQuoteResponseParser, postSerializeOrderParser, postSerializeOrderResponseParser, postSubmitOrderParser, postSubmitOrderResponseParser, protonExplorerTxUrl, rateParser, receiptParser, refferalParser, refferalTotalParser, similarChains, singleActionTransactionParser, sortDirectionEnum, syncParser, traceParser, tradeLogParser, tradeParser, webauthActionParser, withdrawBodyParser, withdrawHistoryMetalResponseParser, withdrawHistoryMetalSwapParser, withdrawMetalResponseParser, withdrawalFeeQuoteParser, wrapParser, wrapSetConfParser, wrapStartParser };
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ __export(src_exports, {
|
|
|
77
77
|
getHistoryActionsParser: () => getHistoryActionsParser,
|
|
78
78
|
getHistoryActionsResponseParser: () => getHistoryActionsResponseParser,
|
|
79
79
|
getHistoryTransactionResponseParser: () => getHistoryTransactionResponseParser,
|
|
80
|
+
getHistoryTransfersParser: () => getHistoryTransfersParser,
|
|
80
81
|
getLeaderboardParser: () => getLeaderboardParser,
|
|
81
82
|
getLeaderboardResponseParser: () => getLeaderboardResponseParser,
|
|
82
83
|
getMarketsResponseParser: () => getMarketsResponseParser,
|
|
@@ -130,6 +131,7 @@ __export(src_exports, {
|
|
|
130
131
|
refferalTotalParser: () => refferalTotalParser,
|
|
131
132
|
similarChains: () => similarChains,
|
|
132
133
|
singleActionTransactionParser: () => singleActionTransactionParser,
|
|
134
|
+
sortDirectionEnum: () => sortDirectionEnum,
|
|
133
135
|
syncParser: () => syncParser,
|
|
134
136
|
traceParser: () => traceParser,
|
|
135
137
|
tradeLogParser: () => tradeLogParser,
|
|
@@ -1912,6 +1914,7 @@ var contractFiltersParser = z11.array(z11.string()).or(z11.string()).optional().
|
|
|
1912
1914
|
return [];
|
|
1913
1915
|
return Array.isArray(oids) ? oids : [oids];
|
|
1914
1916
|
});
|
|
1917
|
+
var sortDirectionEnum = z11.enum(["asc", "desc"]);
|
|
1915
1918
|
var ohlcvParser = z11.object({
|
|
1916
1919
|
time: z11.number(),
|
|
1917
1920
|
open: z11.number(),
|
|
@@ -2333,13 +2336,13 @@ var getHistoryTransactionResponseParser = z11.object({
|
|
|
2333
2336
|
data: historyTransactionParser.nullable()
|
|
2334
2337
|
});
|
|
2335
2338
|
var getHistoryActionsParser = z11.object({
|
|
2336
|
-
account: z11.string(),
|
|
2339
|
+
account: z11.string().min(1, { message: "account is required" }),
|
|
2337
2340
|
contract_filters: contractFiltersParser,
|
|
2338
2341
|
account_seq_from: z11.string().optional(),
|
|
2339
2342
|
account_seq_to: z11.string().optional(),
|
|
2340
2343
|
date_from: z11.string().optional(),
|
|
2341
2344
|
date_to: z11.string().optional(),
|
|
2342
|
-
direction:
|
|
2345
|
+
direction: sortDirectionEnum.optional(),
|
|
2343
2346
|
limit: createLimit(100, 250)
|
|
2344
2347
|
});
|
|
2345
2348
|
var historyActionParser = z11.object({
|
|
@@ -2356,6 +2359,20 @@ var getHistoryActionsResponseParser = z11.object({
|
|
|
2356
2359
|
last_irreversible_block_num: z11.number(),
|
|
2357
2360
|
data: z11.array(historyActionParser)
|
|
2358
2361
|
});
|
|
2362
|
+
var getHistoryTransfersParser = z11.object({
|
|
2363
|
+
transfer_from: z11.string().optional(),
|
|
2364
|
+
transfer_to: z11.string().optional(),
|
|
2365
|
+
contract: z11.string().optional(),
|
|
2366
|
+
symbol: z11.string().optional(),
|
|
2367
|
+
amount_min: z11.string().optional(),
|
|
2368
|
+
amount_max: z11.string().optional(),
|
|
2369
|
+
date_from: z11.string().optional(),
|
|
2370
|
+
date_to: z11.string().optional(),
|
|
2371
|
+
global_seq_from: z11.string().optional(),
|
|
2372
|
+
global_seq_to: z11.string().optional(),
|
|
2373
|
+
direction: sortDirectionEnum.optional(),
|
|
2374
|
+
limit: createLimit(100, 250)
|
|
2375
|
+
});
|
|
2359
2376
|
var orderType = /* @__PURE__ */ ((orderType2) => {
|
|
2360
2377
|
orderType2[orderType2["ORDERBOOK"] = 0] = "ORDERBOOK";
|
|
2361
2378
|
orderType2[orderType2["LIMIT"] = 1] = "LIMIT";
|
|
@@ -4105,6 +4122,7 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
4105
4122
|
getHistoryActionsParser,
|
|
4106
4123
|
getHistoryActionsResponseParser,
|
|
4107
4124
|
getHistoryTransactionResponseParser,
|
|
4125
|
+
getHistoryTransfersParser,
|
|
4108
4126
|
getLeaderboardParser,
|
|
4109
4127
|
getLeaderboardResponseParser,
|
|
4110
4128
|
getMarketsResponseParser,
|
|
@@ -4158,6 +4176,7 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
4158
4176
|
refferalTotalParser,
|
|
4159
4177
|
similarChains,
|
|
4160
4178
|
singleActionTransactionParser,
|
|
4179
|
+
sortDirectionEnum,
|
|
4161
4180
|
syncParser,
|
|
4162
4181
|
traceParser,
|
|
4163
4182
|
tradeLogParser,
|
package/dist/index.mjs
CHANGED
|
@@ -1764,6 +1764,7 @@ var contractFiltersParser = z11.array(z11.string()).or(z11.string()).optional().
|
|
|
1764
1764
|
return [];
|
|
1765
1765
|
return Array.isArray(oids) ? oids : [oids];
|
|
1766
1766
|
});
|
|
1767
|
+
var sortDirectionEnum = z11.enum(["asc", "desc"]);
|
|
1767
1768
|
var ohlcvParser = z11.object({
|
|
1768
1769
|
time: z11.number(),
|
|
1769
1770
|
open: z11.number(),
|
|
@@ -2185,13 +2186,13 @@ var getHistoryTransactionResponseParser = z11.object({
|
|
|
2185
2186
|
data: historyTransactionParser.nullable()
|
|
2186
2187
|
});
|
|
2187
2188
|
var getHistoryActionsParser = z11.object({
|
|
2188
|
-
account: z11.string(),
|
|
2189
|
+
account: z11.string().min(1, { message: "account is required" }),
|
|
2189
2190
|
contract_filters: contractFiltersParser,
|
|
2190
2191
|
account_seq_from: z11.string().optional(),
|
|
2191
2192
|
account_seq_to: z11.string().optional(),
|
|
2192
2193
|
date_from: z11.string().optional(),
|
|
2193
2194
|
date_to: z11.string().optional(),
|
|
2194
|
-
direction:
|
|
2195
|
+
direction: sortDirectionEnum.optional(),
|
|
2195
2196
|
limit: createLimit(100, 250)
|
|
2196
2197
|
});
|
|
2197
2198
|
var historyActionParser = z11.object({
|
|
@@ -2208,6 +2209,20 @@ var getHistoryActionsResponseParser = z11.object({
|
|
|
2208
2209
|
last_irreversible_block_num: z11.number(),
|
|
2209
2210
|
data: z11.array(historyActionParser)
|
|
2210
2211
|
});
|
|
2212
|
+
var getHistoryTransfersParser = z11.object({
|
|
2213
|
+
transfer_from: z11.string().optional(),
|
|
2214
|
+
transfer_to: z11.string().optional(),
|
|
2215
|
+
contract: z11.string().optional(),
|
|
2216
|
+
symbol: z11.string().optional(),
|
|
2217
|
+
amount_min: z11.string().optional(),
|
|
2218
|
+
amount_max: z11.string().optional(),
|
|
2219
|
+
date_from: z11.string().optional(),
|
|
2220
|
+
date_to: z11.string().optional(),
|
|
2221
|
+
global_seq_from: z11.string().optional(),
|
|
2222
|
+
global_seq_to: z11.string().optional(),
|
|
2223
|
+
direction: sortDirectionEnum.optional(),
|
|
2224
|
+
limit: createLimit(100, 250)
|
|
2225
|
+
});
|
|
2211
2226
|
var orderType = /* @__PURE__ */ ((orderType2) => {
|
|
2212
2227
|
orderType2[orderType2["ORDERBOOK"] = 0] = "ORDERBOOK";
|
|
2213
2228
|
orderType2[orderType2["LIMIT"] = 1] = "LIMIT";
|
|
@@ -3956,6 +3971,7 @@ export {
|
|
|
3956
3971
|
getHistoryActionsParser,
|
|
3957
3972
|
getHistoryActionsResponseParser,
|
|
3958
3973
|
getHistoryTransactionResponseParser,
|
|
3974
|
+
getHistoryTransfersParser,
|
|
3959
3975
|
getLeaderboardParser,
|
|
3960
3976
|
getLeaderboardResponseParser,
|
|
3961
3977
|
getMarketsResponseParser,
|
|
@@ -4009,6 +4025,7 @@ export {
|
|
|
4009
4025
|
refferalTotalParser,
|
|
4010
4026
|
similarChains,
|
|
4011
4027
|
singleActionTransactionParser,
|
|
4028
|
+
sortDirectionEnum,
|
|
4012
4029
|
syncParser,
|
|
4013
4030
|
traceParser,
|
|
4014
4031
|
tradeLogParser,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.137",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"resolutions": {
|
|
41
41
|
"typescript": "4.5"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0e33f4a8aaea10295c5dde7c033451532e8304fc"
|
|
44
44
|
}
|
package/src/parsers/dex.ts
CHANGED
|
@@ -33,6 +33,9 @@ const contractFiltersParser = z
|
|
|
33
33
|
return Array.isArray(oids) ? oids : [oids];
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
export const sortDirectionEnum = z.enum(["asc", "desc"])
|
|
37
|
+
export type SortDirection = z.input<typeof sortDirectionEnum>;
|
|
38
|
+
|
|
36
39
|
/**
|
|
37
40
|
* OHLCV
|
|
38
41
|
*/
|
|
@@ -623,13 +626,13 @@ export type GetHistoryTransactionResponse = z.input<
|
|
|
623
626
|
* History Actions
|
|
624
627
|
*/
|
|
625
628
|
export const getHistoryActionsParser = z.object({
|
|
626
|
-
account: z.string(),
|
|
629
|
+
account: z.string().min(1, { message: 'account is required' }),
|
|
627
630
|
contract_filters: contractFiltersParser,
|
|
628
631
|
account_seq_from: z.string().optional(),
|
|
629
632
|
account_seq_to: z.string().optional(),
|
|
630
633
|
date_from: z.string().optional(),
|
|
631
634
|
date_to: z.string().optional(),
|
|
632
|
-
direction:
|
|
635
|
+
direction: sortDirectionEnum.optional(),
|
|
633
636
|
limit: createLimit(100, 250)
|
|
634
637
|
});
|
|
635
638
|
export type GetHistoryActions = z.input<typeof getHistoryActionsParser>;
|
|
@@ -653,6 +656,26 @@ export const getHistoryActionsResponseParser = z.object({
|
|
|
653
656
|
});
|
|
654
657
|
export type GetHistoryActionsResponse = z.infer<typeof getHistoryActionsResponseParser>;
|
|
655
658
|
|
|
659
|
+
/**
|
|
660
|
+
* History transfers
|
|
661
|
+
*/
|
|
662
|
+
export const getHistoryTransfersParser = z.object({
|
|
663
|
+
transfer_from: z.string().optional(),
|
|
664
|
+
transfer_to: z.string().optional(),
|
|
665
|
+
contract: z.string().optional(),
|
|
666
|
+
symbol: z.string().optional(),
|
|
667
|
+
amount_min: z.string().optional(),
|
|
668
|
+
amount_max: z.string().optional(),
|
|
669
|
+
date_from: z.string().optional(),
|
|
670
|
+
date_to: z.string().optional(),
|
|
671
|
+
global_seq_from: z.string().optional(),
|
|
672
|
+
global_seq_to: z.string().optional(),
|
|
673
|
+
direction: sortDirectionEnum.optional(),
|
|
674
|
+
limit: createLimit(100, 250)
|
|
675
|
+
});
|
|
676
|
+
export type GetHistoryTransfers = z.input<typeof getHistoryTransfersParser>;
|
|
677
|
+
export type GetHistoryTransfersParsed = z.output<typeof getHistoryTransfersParser>;
|
|
678
|
+
|
|
656
679
|
/**
|
|
657
680
|
* Basic Types
|
|
658
681
|
*/
|