@proton/wrap-constants 0.2.134 → 0.2.136
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 +22 -2
- package/dist/index.mjs +20 -2
- package/package.json +2 -2
- package/src/constants.ts +1 -0
- package/src/parsers/dex.ts +24 -2
package/dist/index.d.ts
CHANGED
|
@@ -6360,6 +6360,7 @@ 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"]>;
|
|
6363
6364
|
/**
|
|
6364
6365
|
* OHLCV
|
|
6365
6366
|
*/
|
|
@@ -10491,7 +10492,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10491
10492
|
account_seq_to: z.ZodOptional<z.ZodString>;
|
|
10492
10493
|
date_from: z.ZodOptional<z.ZodString>;
|
|
10493
10494
|
date_to: z.ZodOptional<z.ZodString>;
|
|
10494
|
-
direction: z.ZodOptional<z.
|
|
10495
|
+
direction: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
10495
10496
|
limit: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, number | undefined>;
|
|
10496
10497
|
}, "strip", z.ZodTypeAny, {
|
|
10497
10498
|
account: string;
|
|
@@ -10501,7 +10502,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10501
10502
|
account_seq_to?: string | undefined;
|
|
10502
10503
|
date_from?: string | undefined;
|
|
10503
10504
|
date_to?: string | undefined;
|
|
10504
|
-
direction?:
|
|
10505
|
+
direction?: "asc" | "desc" | undefined;
|
|
10505
10506
|
}, {
|
|
10506
10507
|
account: string;
|
|
10507
10508
|
contract_filters?: string | string[] | undefined;
|
|
@@ -10509,7 +10510,7 @@ declare const getHistoryActionsParser: z.ZodObject<{
|
|
|
10509
10510
|
account_seq_to?: string | undefined;
|
|
10510
10511
|
date_from?: string | undefined;
|
|
10511
10512
|
date_to?: string | undefined;
|
|
10512
|
-
direction?:
|
|
10513
|
+
direction?: "asc" | "desc" | undefined;
|
|
10513
10514
|
limit?: number | undefined;
|
|
10514
10515
|
}>;
|
|
10515
10516
|
declare type GetHistoryActions = z.input<typeof getHistoryActionsParser>;
|
|
@@ -11126,6 +11127,51 @@ declare const getHistoryActionsResponseParser: z.ZodObject<{
|
|
|
11126
11127
|
last_irreversible_block_num: number;
|
|
11127
11128
|
}>;
|
|
11128
11129
|
declare type GetHistoryActionsResponse = z.infer<typeof getHistoryActionsResponseParser>;
|
|
11130
|
+
/**
|
|
11131
|
+
* History transfers
|
|
11132
|
+
*/
|
|
11133
|
+
declare const getHistoryTransfersParser: z.ZodObject<{
|
|
11134
|
+
transfer_from: z.ZodOptional<z.ZodString>;
|
|
11135
|
+
transfer_to: z.ZodOptional<z.ZodString>;
|
|
11136
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
11137
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
11138
|
+
amount_min: z.ZodOptional<z.ZodString>;
|
|
11139
|
+
amount_max: z.ZodOptional<z.ZodString>;
|
|
11140
|
+
date_from: z.ZodOptional<z.ZodString>;
|
|
11141
|
+
date_to: z.ZodOptional<z.ZodString>;
|
|
11142
|
+
global_seq_from: z.ZodOptional<z.ZodString>;
|
|
11143
|
+
global_seq_to: z.ZodOptional<z.ZodString>;
|
|
11144
|
+
direction: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
11145
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodNumber>, number, number | undefined>;
|
|
11146
|
+
}, "strip", z.ZodTypeAny, {
|
|
11147
|
+
limit: number;
|
|
11148
|
+
transfer_from?: string | undefined;
|
|
11149
|
+
transfer_to?: string | undefined;
|
|
11150
|
+
contract?: string | undefined;
|
|
11151
|
+
symbol?: string | undefined;
|
|
11152
|
+
amount_min?: string | undefined;
|
|
11153
|
+
amount_max?: string | undefined;
|
|
11154
|
+
date_from?: string | undefined;
|
|
11155
|
+
date_to?: string | undefined;
|
|
11156
|
+
global_seq_from?: string | undefined;
|
|
11157
|
+
global_seq_to?: string | undefined;
|
|
11158
|
+
direction?: "asc" | "desc" | undefined;
|
|
11159
|
+
}, {
|
|
11160
|
+
transfer_from?: string | undefined;
|
|
11161
|
+
transfer_to?: string | undefined;
|
|
11162
|
+
contract?: string | undefined;
|
|
11163
|
+
symbol?: string | undefined;
|
|
11164
|
+
amount_min?: string | undefined;
|
|
11165
|
+
amount_max?: string | undefined;
|
|
11166
|
+
date_from?: string | undefined;
|
|
11167
|
+
date_to?: string | undefined;
|
|
11168
|
+
global_seq_from?: string | undefined;
|
|
11169
|
+
global_seq_to?: string | undefined;
|
|
11170
|
+
direction?: "asc" | "desc" | undefined;
|
|
11171
|
+
limit?: number | undefined;
|
|
11172
|
+
}>;
|
|
11173
|
+
declare type GetHistoryTransfers = z.input<typeof getHistoryTransfersParser>;
|
|
11174
|
+
declare type GetHistoryTransfersParsed = z.output<typeof getHistoryTransfersParser>;
|
|
11129
11175
|
/**
|
|
11130
11176
|
* Basic Types
|
|
11131
11177
|
*/
|
|
@@ -12083,6 +12129,7 @@ declare const WRAP_AUTH_ACTION = "generateauth";
|
|
|
12083
12129
|
declare const FEE_FACTOR = 10000;
|
|
12084
12130
|
declare const initializeConstants: (chain: string) => {
|
|
12085
12131
|
SWAP_CONTRACT: string;
|
|
12132
|
+
VEST_CONTRACT: string;
|
|
12086
12133
|
DEX_CONTRACT: string;
|
|
12087
12134
|
FEE_FACTOR: number;
|
|
12088
12135
|
GOOGLE_MAPS_KEY: string;
|
|
@@ -12171,4 +12218,4 @@ declare const isInputInvalid: (data: string, value: string | number, pool: {
|
|
|
12171
12218
|
}) => boolean;
|
|
12172
12219
|
declare const applyDiscountToFee: (fee: number, staked: number) => number;
|
|
12173
12220
|
|
|
12174
|
-
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 };
|
|
12221
|
+
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, 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,
|
|
@@ -1564,6 +1566,7 @@ var initializeConstants = (chain) => {
|
|
|
1564
1566
|
} = initializeCoins(chain);
|
|
1565
1567
|
const constants = {
|
|
1566
1568
|
SWAP_CONTRACT: "proton.swaps",
|
|
1569
|
+
VEST_CONTRACT: "vest",
|
|
1567
1570
|
DEX_CONTRACT: "dex",
|
|
1568
1571
|
FEE_FACTOR,
|
|
1569
1572
|
GOOGLE_MAPS_KEY: "AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs",
|
|
@@ -1911,6 +1914,7 @@ var contractFiltersParser = z11.array(z11.string()).or(z11.string()).optional().
|
|
|
1911
1914
|
return [];
|
|
1912
1915
|
return Array.isArray(oids) ? oids : [oids];
|
|
1913
1916
|
});
|
|
1917
|
+
var sortDirectionEnum = z11.enum(["asc", "desc"]);
|
|
1914
1918
|
var ohlcvParser = z11.object({
|
|
1915
1919
|
time: z11.number(),
|
|
1916
1920
|
open: z11.number(),
|
|
@@ -2332,13 +2336,13 @@ var getHistoryTransactionResponseParser = z11.object({
|
|
|
2332
2336
|
data: historyTransactionParser.nullable()
|
|
2333
2337
|
});
|
|
2334
2338
|
var getHistoryActionsParser = z11.object({
|
|
2335
|
-
account: z11.string(),
|
|
2339
|
+
account: z11.string().min(1, { message: "account is required" }),
|
|
2336
2340
|
contract_filters: contractFiltersParser,
|
|
2337
2341
|
account_seq_from: z11.string().optional(),
|
|
2338
2342
|
account_seq_to: z11.string().optional(),
|
|
2339
2343
|
date_from: z11.string().optional(),
|
|
2340
2344
|
date_to: z11.string().optional(),
|
|
2341
|
-
direction:
|
|
2345
|
+
direction: sortDirectionEnum.optional(),
|
|
2342
2346
|
limit: createLimit(100, 250)
|
|
2343
2347
|
});
|
|
2344
2348
|
var historyActionParser = z11.object({
|
|
@@ -2355,6 +2359,20 @@ var getHistoryActionsResponseParser = z11.object({
|
|
|
2355
2359
|
last_irreversible_block_num: z11.number(),
|
|
2356
2360
|
data: z11.array(historyActionParser)
|
|
2357
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
|
+
});
|
|
2358
2376
|
var orderType = /* @__PURE__ */ ((orderType2) => {
|
|
2359
2377
|
orderType2[orderType2["ORDERBOOK"] = 0] = "ORDERBOOK";
|
|
2360
2378
|
orderType2[orderType2["LIMIT"] = 1] = "LIMIT";
|
|
@@ -4104,6 +4122,7 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
4104
4122
|
getHistoryActionsParser,
|
|
4105
4123
|
getHistoryActionsResponseParser,
|
|
4106
4124
|
getHistoryTransactionResponseParser,
|
|
4125
|
+
getHistoryTransfersParser,
|
|
4107
4126
|
getLeaderboardParser,
|
|
4108
4127
|
getLeaderboardResponseParser,
|
|
4109
4128
|
getMarketsResponseParser,
|
|
@@ -4157,6 +4176,7 @@ var applyDiscountToFee = (fee, staked) => {
|
|
|
4157
4176
|
refferalTotalParser,
|
|
4158
4177
|
similarChains,
|
|
4159
4178
|
singleActionTransactionParser,
|
|
4179
|
+
sortDirectionEnum,
|
|
4160
4180
|
syncParser,
|
|
4161
4181
|
traceParser,
|
|
4162
4182
|
tradeLogParser,
|
package/dist/index.mjs
CHANGED
|
@@ -1416,6 +1416,7 @@ var initializeConstants = (chain) => {
|
|
|
1416
1416
|
} = initializeCoins(chain);
|
|
1417
1417
|
const constants = {
|
|
1418
1418
|
SWAP_CONTRACT: "proton.swaps",
|
|
1419
|
+
VEST_CONTRACT: "vest",
|
|
1419
1420
|
DEX_CONTRACT: "dex",
|
|
1420
1421
|
FEE_FACTOR,
|
|
1421
1422
|
GOOGLE_MAPS_KEY: "AIzaSyDb2_CrK032kSIqBXbkdwmaLKWELl0SxVs",
|
|
@@ -1763,6 +1764,7 @@ var contractFiltersParser = z11.array(z11.string()).or(z11.string()).optional().
|
|
|
1763
1764
|
return [];
|
|
1764
1765
|
return Array.isArray(oids) ? oids : [oids];
|
|
1765
1766
|
});
|
|
1767
|
+
var sortDirectionEnum = z11.enum(["asc", "desc"]);
|
|
1766
1768
|
var ohlcvParser = z11.object({
|
|
1767
1769
|
time: z11.number(),
|
|
1768
1770
|
open: z11.number(),
|
|
@@ -2184,13 +2186,13 @@ var getHistoryTransactionResponseParser = z11.object({
|
|
|
2184
2186
|
data: historyTransactionParser.nullable()
|
|
2185
2187
|
});
|
|
2186
2188
|
var getHistoryActionsParser = z11.object({
|
|
2187
|
-
account: z11.string(),
|
|
2189
|
+
account: z11.string().min(1, { message: "account is required" }),
|
|
2188
2190
|
contract_filters: contractFiltersParser,
|
|
2189
2191
|
account_seq_from: z11.string().optional(),
|
|
2190
2192
|
account_seq_to: z11.string().optional(),
|
|
2191
2193
|
date_from: z11.string().optional(),
|
|
2192
2194
|
date_to: z11.string().optional(),
|
|
2193
|
-
direction:
|
|
2195
|
+
direction: sortDirectionEnum.optional(),
|
|
2194
2196
|
limit: createLimit(100, 250)
|
|
2195
2197
|
});
|
|
2196
2198
|
var historyActionParser = z11.object({
|
|
@@ -2207,6 +2209,20 @@ var getHistoryActionsResponseParser = z11.object({
|
|
|
2207
2209
|
last_irreversible_block_num: z11.number(),
|
|
2208
2210
|
data: z11.array(historyActionParser)
|
|
2209
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
|
+
});
|
|
2210
2226
|
var orderType = /* @__PURE__ */ ((orderType2) => {
|
|
2211
2227
|
orderType2[orderType2["ORDERBOOK"] = 0] = "ORDERBOOK";
|
|
2212
2228
|
orderType2[orderType2["LIMIT"] = 1] = "LIMIT";
|
|
@@ -3955,6 +3971,7 @@ export {
|
|
|
3955
3971
|
getHistoryActionsParser,
|
|
3956
3972
|
getHistoryActionsResponseParser,
|
|
3957
3973
|
getHistoryTransactionResponseParser,
|
|
3974
|
+
getHistoryTransfersParser,
|
|
3958
3975
|
getLeaderboardParser,
|
|
3959
3976
|
getLeaderboardResponseParser,
|
|
3960
3977
|
getMarketsResponseParser,
|
|
@@ -4008,6 +4025,7 @@ export {
|
|
|
4008
4025
|
refferalTotalParser,
|
|
4009
4026
|
similarChains,
|
|
4010
4027
|
singleActionTransactionParser,
|
|
4028
|
+
sortDirectionEnum,
|
|
4011
4029
|
syncParser,
|
|
4012
4030
|
traceParser,
|
|
4013
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.136",
|
|
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": "cba37d8ba47dc048733bc7218b66807587fea938"
|
|
44
44
|
}
|
package/src/constants.ts
CHANGED
package/src/parsers/dex.ts
CHANGED
|
@@ -33,6 +33,8 @@ const contractFiltersParser = z
|
|
|
33
33
|
return Array.isArray(oids) ? oids : [oids];
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
export const sortDirectionEnum = z.enum(["asc", "desc"])
|
|
37
|
+
|
|
36
38
|
/**
|
|
37
39
|
* OHLCV
|
|
38
40
|
*/
|
|
@@ -623,13 +625,13 @@ export type GetHistoryTransactionResponse = z.input<
|
|
|
623
625
|
* History Actions
|
|
624
626
|
*/
|
|
625
627
|
export const getHistoryActionsParser = z.object({
|
|
626
|
-
account: z.string(),
|
|
628
|
+
account: z.string().min(1, { message: 'account is required' }),
|
|
627
629
|
contract_filters: contractFiltersParser,
|
|
628
630
|
account_seq_from: z.string().optional(),
|
|
629
631
|
account_seq_to: z.string().optional(),
|
|
630
632
|
date_from: z.string().optional(),
|
|
631
633
|
date_to: z.string().optional(),
|
|
632
|
-
direction:
|
|
634
|
+
direction: sortDirectionEnum.optional(),
|
|
633
635
|
limit: createLimit(100, 250)
|
|
634
636
|
});
|
|
635
637
|
export type GetHistoryActions = z.input<typeof getHistoryActionsParser>;
|
|
@@ -653,6 +655,26 @@ export const getHistoryActionsResponseParser = z.object({
|
|
|
653
655
|
});
|
|
654
656
|
export type GetHistoryActionsResponse = z.infer<typeof getHistoryActionsResponseParser>;
|
|
655
657
|
|
|
658
|
+
/**
|
|
659
|
+
* History transfers
|
|
660
|
+
*/
|
|
661
|
+
export const getHistoryTransfersParser = z.object({
|
|
662
|
+
transfer_from: z.string().optional(),
|
|
663
|
+
transfer_to: z.string().optional(),
|
|
664
|
+
contract: z.string().optional(),
|
|
665
|
+
symbol: z.string().optional(),
|
|
666
|
+
amount_min: z.string().optional(),
|
|
667
|
+
amount_max: z.string().optional(),
|
|
668
|
+
date_from: z.string().optional(),
|
|
669
|
+
date_to: z.string().optional(),
|
|
670
|
+
global_seq_from: z.string().optional(),
|
|
671
|
+
global_seq_to: z.string().optional(),
|
|
672
|
+
direction: sortDirectionEnum.optional(),
|
|
673
|
+
limit: createLimit(100, 250)
|
|
674
|
+
});
|
|
675
|
+
export type GetHistoryTransfers = z.input<typeof getHistoryTransfersParser>;
|
|
676
|
+
export type GetHistoryTransfersParsed = z.output<typeof getHistoryTransfersParser>;
|
|
677
|
+
|
|
656
678
|
/**
|
|
657
679
|
* Basic Types
|
|
658
680
|
*/
|