@0xtorch/core 0.0.10 → 0.0.12
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/_cjs/actions/index.js +14 -3
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/parsers/action.js +343 -0
- package/_cjs/actions/parsers/action.js.map +1 -0
- package/_cjs/actions/parsers/index.js +3 -1
- package/_cjs/actions/parsers/index.js.map +1 -1
- package/_cjs/actions/utils.js +22 -0
- package/_cjs/actions/utils.js.map +1 -0
- package/_cjs/index.js +13 -3
- package/_cjs/index.js.map +1 -1
- package/_esm/actions/index.js +2 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/parsers/action.js +339 -0
- package/_esm/actions/parsers/action.js.map +1 -0
- package/_esm/actions/parsers/index.js +1 -0
- package/_esm/actions/parsers/index.js.map +1 -1
- package/_esm/actions/utils.js +10 -0
- package/_esm/actions/utils.js.map +1 -0
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_types/actions/index.d.ts +2 -1
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/parsers/action.d.ts +4 -0
- package/_types/actions/parsers/action.d.ts.map +1 -0
- package/_types/actions/parsers/index.d.ts +1 -0
- package/_types/actions/parsers/index.d.ts.map +1 -1
- package/_types/actions/utils.d.ts +242 -0
- package/_types/actions/utils.d.ts.map +1 -0
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/actions/index.ts +12 -0
- package/actions/parsers/action.ts +392 -0
- package/actions/parsers/index.ts +1 -0
- package/actions/utils.ts +57 -0
- package/index.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type { Transfer } from './types';
|
|
2
|
+
export declare const isTransferCryptoCurrencyIn: (transfer: Transfer) => transfer is {
|
|
3
|
+
from: string | undefined;
|
|
4
|
+
to: string | undefined;
|
|
5
|
+
price: {
|
|
6
|
+
cryptoCurrencyId: string;
|
|
7
|
+
fiatCurrencyId: string;
|
|
8
|
+
price: {
|
|
9
|
+
value: bigint;
|
|
10
|
+
decimals: number;
|
|
11
|
+
};
|
|
12
|
+
timestamp: number;
|
|
13
|
+
} | undefined;
|
|
14
|
+
asset: {
|
|
15
|
+
icon: string | undefined;
|
|
16
|
+
symbol: string;
|
|
17
|
+
type: "CryptoCurrency";
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
market: {
|
|
21
|
+
coingeckoId: string | undefined;
|
|
22
|
+
marketCapUsd: {
|
|
23
|
+
value: bigint;
|
|
24
|
+
decimals: number;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
updatedAt: number;
|
|
28
|
+
};
|
|
29
|
+
amount: {
|
|
30
|
+
value: bigint;
|
|
31
|
+
decimals: number;
|
|
32
|
+
};
|
|
33
|
+
direction: "in";
|
|
34
|
+
};
|
|
35
|
+
export declare const isTransferCryptoCurrencyOut: (transfer: Transfer) => transfer is {
|
|
36
|
+
from: string | undefined;
|
|
37
|
+
to: string | undefined;
|
|
38
|
+
price: {
|
|
39
|
+
cryptoCurrencyId: string;
|
|
40
|
+
fiatCurrencyId: string;
|
|
41
|
+
price: {
|
|
42
|
+
value: bigint;
|
|
43
|
+
decimals: number;
|
|
44
|
+
};
|
|
45
|
+
timestamp: number;
|
|
46
|
+
} | undefined;
|
|
47
|
+
asset: {
|
|
48
|
+
icon: string | undefined;
|
|
49
|
+
symbol: string;
|
|
50
|
+
type: "CryptoCurrency";
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
market: {
|
|
54
|
+
coingeckoId: string | undefined;
|
|
55
|
+
marketCapUsd: {
|
|
56
|
+
value: bigint;
|
|
57
|
+
decimals: number;
|
|
58
|
+
} | undefined;
|
|
59
|
+
};
|
|
60
|
+
updatedAt: number;
|
|
61
|
+
};
|
|
62
|
+
amount: {
|
|
63
|
+
value: bigint;
|
|
64
|
+
decimals: number;
|
|
65
|
+
};
|
|
66
|
+
direction: "out";
|
|
67
|
+
};
|
|
68
|
+
export declare const isTransferCryptoCurrencyNone: (transfer: Transfer) => transfer is {
|
|
69
|
+
from: string | undefined;
|
|
70
|
+
to: string | undefined;
|
|
71
|
+
price: {
|
|
72
|
+
cryptoCurrencyId: string;
|
|
73
|
+
fiatCurrencyId: string;
|
|
74
|
+
price: {
|
|
75
|
+
value: bigint;
|
|
76
|
+
decimals: number;
|
|
77
|
+
};
|
|
78
|
+
timestamp: number;
|
|
79
|
+
} | undefined;
|
|
80
|
+
asset: {
|
|
81
|
+
icon: string | undefined;
|
|
82
|
+
symbol: string;
|
|
83
|
+
type: "CryptoCurrency";
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
market: {
|
|
87
|
+
coingeckoId: string | undefined;
|
|
88
|
+
marketCapUsd: {
|
|
89
|
+
value: bigint;
|
|
90
|
+
decimals: number;
|
|
91
|
+
} | undefined;
|
|
92
|
+
};
|
|
93
|
+
updatedAt: number;
|
|
94
|
+
};
|
|
95
|
+
amount: {
|
|
96
|
+
value: bigint;
|
|
97
|
+
decimals: number;
|
|
98
|
+
};
|
|
99
|
+
direction: "none";
|
|
100
|
+
};
|
|
101
|
+
export declare const isTransferNftIn: (transfer: Transfer) => transfer is {
|
|
102
|
+
from: string | undefined;
|
|
103
|
+
to: string | undefined;
|
|
104
|
+
price: {
|
|
105
|
+
cryptoCurrencyId: string;
|
|
106
|
+
fiatCurrencyId: string;
|
|
107
|
+
price: {
|
|
108
|
+
value: bigint;
|
|
109
|
+
decimals: number;
|
|
110
|
+
};
|
|
111
|
+
timestamp: number;
|
|
112
|
+
} | undefined;
|
|
113
|
+
asset: {
|
|
114
|
+
type: "Nft";
|
|
115
|
+
id: string;
|
|
116
|
+
};
|
|
117
|
+
amount: {
|
|
118
|
+
value: bigint;
|
|
119
|
+
decimals: number;
|
|
120
|
+
};
|
|
121
|
+
direction: "in";
|
|
122
|
+
};
|
|
123
|
+
export declare const isTransferNftOut: (transfer: Transfer) => transfer is {
|
|
124
|
+
from: string | undefined;
|
|
125
|
+
to: string | undefined;
|
|
126
|
+
price: {
|
|
127
|
+
cryptoCurrencyId: string;
|
|
128
|
+
fiatCurrencyId: string;
|
|
129
|
+
price: {
|
|
130
|
+
value: bigint;
|
|
131
|
+
decimals: number;
|
|
132
|
+
};
|
|
133
|
+
timestamp: number;
|
|
134
|
+
} | undefined;
|
|
135
|
+
asset: {
|
|
136
|
+
type: "Nft";
|
|
137
|
+
id: string;
|
|
138
|
+
};
|
|
139
|
+
amount: {
|
|
140
|
+
value: bigint;
|
|
141
|
+
decimals: number;
|
|
142
|
+
};
|
|
143
|
+
direction: "out";
|
|
144
|
+
};
|
|
145
|
+
export declare const isTransferNftNone: (transfer: Transfer) => transfer is {
|
|
146
|
+
from: string | undefined;
|
|
147
|
+
to: string | undefined;
|
|
148
|
+
price: {
|
|
149
|
+
cryptoCurrencyId: string;
|
|
150
|
+
fiatCurrencyId: string;
|
|
151
|
+
price: {
|
|
152
|
+
value: bigint;
|
|
153
|
+
decimals: number;
|
|
154
|
+
};
|
|
155
|
+
timestamp: number;
|
|
156
|
+
} | undefined;
|
|
157
|
+
asset: {
|
|
158
|
+
type: "Nft";
|
|
159
|
+
id: string;
|
|
160
|
+
};
|
|
161
|
+
amount: {
|
|
162
|
+
value: bigint;
|
|
163
|
+
decimals: number;
|
|
164
|
+
};
|
|
165
|
+
direction: "none";
|
|
166
|
+
};
|
|
167
|
+
export declare const isTransferFiatCurrencyIn: (transfer: Transfer) => transfer is {
|
|
168
|
+
from: string | undefined;
|
|
169
|
+
to: string | undefined;
|
|
170
|
+
price: {
|
|
171
|
+
cryptoCurrencyId: string;
|
|
172
|
+
fiatCurrencyId: string;
|
|
173
|
+
price: {
|
|
174
|
+
value: bigint;
|
|
175
|
+
decimals: number;
|
|
176
|
+
};
|
|
177
|
+
timestamp: number;
|
|
178
|
+
} | undefined;
|
|
179
|
+
asset: {
|
|
180
|
+
icon: string | undefined;
|
|
181
|
+
symbol: string;
|
|
182
|
+
type: "FiatCurrency";
|
|
183
|
+
id: "cny" | "eur" | "idr" | "jpy" | "krw" | "rub" | "twd" | "usd";
|
|
184
|
+
name: string;
|
|
185
|
+
};
|
|
186
|
+
amount: {
|
|
187
|
+
value: bigint;
|
|
188
|
+
decimals: number;
|
|
189
|
+
};
|
|
190
|
+
direction: "in";
|
|
191
|
+
};
|
|
192
|
+
export declare const isTransferFiatCurrencyOut: (transfer: Transfer) => transfer is {
|
|
193
|
+
from: string | undefined;
|
|
194
|
+
to: string | undefined;
|
|
195
|
+
price: {
|
|
196
|
+
cryptoCurrencyId: string;
|
|
197
|
+
fiatCurrencyId: string;
|
|
198
|
+
price: {
|
|
199
|
+
value: bigint;
|
|
200
|
+
decimals: number;
|
|
201
|
+
};
|
|
202
|
+
timestamp: number;
|
|
203
|
+
} | undefined;
|
|
204
|
+
asset: {
|
|
205
|
+
icon: string | undefined;
|
|
206
|
+
symbol: string;
|
|
207
|
+
type: "FiatCurrency";
|
|
208
|
+
id: "cny" | "eur" | "idr" | "jpy" | "krw" | "rub" | "twd" | "usd";
|
|
209
|
+
name: string;
|
|
210
|
+
};
|
|
211
|
+
amount: {
|
|
212
|
+
value: bigint;
|
|
213
|
+
decimals: number;
|
|
214
|
+
};
|
|
215
|
+
direction: "out";
|
|
216
|
+
};
|
|
217
|
+
export declare const isTransferFiatCurrencyNone: (transfer: Transfer) => transfer is {
|
|
218
|
+
from: string | undefined;
|
|
219
|
+
to: string | undefined;
|
|
220
|
+
price: {
|
|
221
|
+
cryptoCurrencyId: string;
|
|
222
|
+
fiatCurrencyId: string;
|
|
223
|
+
price: {
|
|
224
|
+
value: bigint;
|
|
225
|
+
decimals: number;
|
|
226
|
+
};
|
|
227
|
+
timestamp: number;
|
|
228
|
+
} | undefined;
|
|
229
|
+
asset: {
|
|
230
|
+
icon: string | undefined;
|
|
231
|
+
symbol: string;
|
|
232
|
+
type: "FiatCurrency";
|
|
233
|
+
id: "cny" | "eur" | "idr" | "jpy" | "krw" | "rub" | "twd" | "usd";
|
|
234
|
+
name: string;
|
|
235
|
+
};
|
|
236
|
+
amount: {
|
|
237
|
+
value: bigint;
|
|
238
|
+
decimals: number;
|
|
239
|
+
};
|
|
240
|
+
direction: "none";
|
|
241
|
+
};
|
|
242
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../actions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAUT,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,0BAA0B,aAC3B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEqD,CAAA;AAEzE,eAAO,MAAM,2BAA2B,aAC5B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEsD,CAAA;AAE1E,eAAO,MAAM,4BAA4B,aAC7B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEuD,CAAA;AAE3E,eAAO,MAAM,eAAe,aAChB,QAAQ;;;;;;;;;;;;;;;;;;;;;CAE0C,CAAA;AAE9D,eAAO,MAAM,gBAAgB,aACjB,QAAQ;;;;;;;;;;;;;;;;;;;;;CAE2C,CAAA;AAE/D,eAAO,MAAM,iBAAiB,aAClB,QAAQ;;;;;;;;;;;;;;;;;;;;;CAE4C,CAAA;AAEhE,eAAO,MAAM,wBAAwB,aACzB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;CAEmD,CAAA;AAEvE,eAAO,MAAM,yBAAyB,aAC1B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;CAEoD,CAAA;AAExE,eAAO,MAAM,0BAA0B,aAC3B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;CAEqD,CAAA"}
|
package/_types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { Account } from './accounts';
|
|
2
|
-
export { accountActionAddLiquiditySchema, accountActionApproveSchema, accountActionAtomicArbitrageSchema, accountActionBorrowSchema, accountActionBorrowWithDebtSchema, accountActionBridgeFromSchema, accountActionBridgeToSchema, accountActionBuyCryptoSchema, accountActionBuyNftSchema, accountActionCrossReplaceSchema, accountActionCrossTradeSchema, accountActionDepositSchema, accountActionDepositWithBondSchema, accountActionFailTxSchema, accountActionFeeSchema, accountActionFreeMintNftSchema, accountActionIgnoreSchema, accountActionIncomeSchema, accountActionMintNftSchema, accountActionMoveSchema, accountActionNftRoyaltySchema, accountActionReceiveFromCexSchema, accountActionReduceSchema, accountActionRemoveLiquiditySchema, accountActionRepaymentSchema, accountActionRepaymentWithDebtSchema, accountActionReplaceSchema, accountActionRevokeSchema, accountActionSchema, accountActionSellCryptoSchema, accountActionSellNftSchema, accountActionSendToCexSchema, accountActionSpamSchema, accountActionStakeSchema, accountActionSwapIncomeSchema, accountActionSwapNftSchema, accountActionSwapTransferSchema, accountActionTradeSchema, accountActionTransactionFeeSchema, accountActionTransferSchema, accountActionUnstakeSchema, accountActionUnwrapSchema, accountActionValuedownSchema, accountActionValueupSchema, accountActionWithdrawSchema, accountActionWithdrawWithBondSchema, accountActionWrapSchema, crossActionBundleSchema, normalActionActionSchema, normalActionAddLiquiditySchema, normalActionApproveSchema, normalActionAtomicArbitrageSchema, normalActionBorrowSchema, normalActionBorrowWithDebtSchema, normalActionBridgeFromSchema, normalActionBridgeToSchema, normalActionBuyCryptoSchema, normalActionBuyNftSchema, normalActionCrossReplaceSchema, normalActionCrossTradeSchema, normalActionDepositSchema, normalActionDepositWithBondSchema, normalActionFailTxSchema, normalActionFeeSchema, normalActionFreeMintNftSchema, normalActionIncomeSchema, normalActionMintNftSchema, normalActionReceiveFromCexSchema, normalActionRemoveLiquiditySchema, normalActionRepaymentSchema, normalActionRepaymentWithDebtSchema, normalActionReplaceSchema, normalActionRevokeSchema, normalActionSchema, normalActionSellCryptoSchema, normalActionSellNftSchema, normalActionSendToCexSchema, normalActionSpamSchema, normalActionStakeSchema, normalActionSwapNftSchema, normalActionTradeSchema, normalActionTransactionFeeSchema, normalActionTransferSchema, normalActionUnstakeSchema, normalActionUnwrapSchema, normalActionValuedownSchema, normalActionValueupSchema, normalActionWithdrawSchema, normalActionWithdrawWithBondSchema, normalActionWrapSchema, } from './actions';
|
|
2
|
+
export { accountActionAddLiquiditySchema, accountActionApproveSchema, accountActionAtomicArbitrageSchema, accountActionBorrowSchema, accountActionBorrowWithDebtSchema, accountActionBridgeFromSchema, accountActionBridgeToSchema, accountActionBuyCryptoSchema, accountActionBuyNftSchema, accountActionCrossReplaceSchema, accountActionCrossTradeSchema, accountActionDepositSchema, accountActionDepositWithBondSchema, accountActionFailTxSchema, accountActionFeeSchema, accountActionFreeMintNftSchema, accountActionIgnoreSchema, accountActionIncomeSchema, accountActionMintNftSchema, accountActionMoveSchema, accountActionNftRoyaltySchema, accountActionReceiveFromCexSchema, accountActionReduceSchema, accountActionRemoveLiquiditySchema, accountActionRepaymentSchema, accountActionRepaymentWithDebtSchema, accountActionReplaceSchema, accountActionRevokeSchema, accountActionSchema, accountActionSellCryptoSchema, accountActionSellNftSchema, accountActionSendToCexSchema, accountActionSpamSchema, accountActionStakeSchema, accountActionSwapIncomeSchema, accountActionSwapNftSchema, accountActionSwapTransferSchema, accountActionTradeSchema, accountActionTransactionFeeSchema, accountActionTransferSchema, accountActionUnstakeSchema, accountActionUnwrapSchema, accountActionValuedownSchema, accountActionValueupSchema, accountActionWithdrawSchema, accountActionWithdrawWithBondSchema, accountActionWrapSchema, crossActionBundleSchema, isTransferCryptoCurrencyIn, isTransferCryptoCurrencyNone, isTransferCryptoCurrencyOut, isTransferFiatCurrencyIn, isTransferFiatCurrencyNone, isTransferFiatCurrencyOut, isTransferNftIn, isTransferNftNone, isTransferNftOut, normalActionActionSchema, normalActionAddLiquiditySchema, normalActionApproveSchema, normalActionAtomicArbitrageSchema, normalActionBorrowSchema, normalActionBorrowWithDebtSchema, normalActionBridgeFromSchema, normalActionBridgeToSchema, normalActionBuyCryptoSchema, normalActionBuyNftSchema, normalActionCrossReplaceSchema, normalActionCrossTradeSchema, normalActionDepositSchema, normalActionDepositWithBondSchema, normalActionFailTxSchema, normalActionFeeSchema, normalActionFreeMintNftSchema, normalActionIncomeSchema, normalActionMintNftSchema, normalActionReceiveFromCexSchema, normalActionRemoveLiquiditySchema, normalActionRepaymentSchema, normalActionRepaymentWithDebtSchema, normalActionReplaceSchema, normalActionRevokeSchema, normalActionSchema, normalActionSellCryptoSchema, normalActionSellNftSchema, normalActionSendToCexSchema, normalActionSpamSchema, normalActionStakeSchema, normalActionSwapNftSchema, normalActionTradeSchema, normalActionTransactionFeeSchema, normalActionTransferSchema, normalActionUnstakeSchema, normalActionUnwrapSchema, normalActionValuedownSchema, normalActionValueupSchema, normalActionWithdrawSchema, normalActionWithdrawWithBondSchema, normalActionWrapSchema, parseNormalActionToAccountActions, } from './actions';
|
|
3
3
|
export type { AccountAction, AccountActionAddLiquidity, AccountActionApprove, AccountActionAtomicArbitrage, AccountActionBorrow, AccountActionBorrowWithDebt, AccountActionBridgeFrom, AccountActionBridgeTo, AccountActionBuyCrypto, AccountActionBuyNft, AccountActionCrossReplace, AccountActionCrossTrade, AccountActionDeposit, AccountActionDepositWithBond, AccountActionFailTx, AccountActionFee, AccountActionFreeMintNft, AccountActionIgnore, AccountActionIncome, AccountActionMintNft, AccountActionMove, AccountActionNftRoyalty, AccountActionReceiveFromCex, AccountActionReduce, AccountActionRemoveLiquidity, AccountActionRepayment, AccountActionRepaymentWithDebt, AccountActionReplace, AccountActionRevoke, AccountActionSellCrypto, AccountActionSellNft, AccountActionSendToCex, AccountActionSpam, AccountActionStake, AccountActionSwapIncome, AccountActionSwapNft, AccountActionSwapTransfer, AccountActionTrade, AccountActionTransactionFee, AccountActionTransfer, AccountActionType, AccountActionUnstake, AccountActionUnwrap, AccountActionValuedown, AccountActionValueup, AccountActionWithdraw, AccountActionWithdrawWithBond, AccountActionWrap, ActionType, CrossActionBundle, Evidence, NormalAction, NormalActionAddLiquidity, NormalActionApprove, NormalActionAtomicArbitrage, NormalActionBorrow, NormalActionBorrowWithDebt, NormalActionBridgeFrom, NormalActionBridgeTo, NormalActionBuyCrypto, NormalActionBuyNft, NormalActionCrossReplace, NormalActionCrossTrade, NormalActionDeposit, NormalActionDepositWithBond, NormalActionFailTx, NormalActionFee, NormalActionFreeMintNft, NormalActionIncome, NormalActionMintNft, NormalActionReceiveFromCex, NormalActionRemoveLiquidity, NormalActionRepayment, NormalActionRepaymentWithDebt, NormalActionReplace, NormalActionRevoke, NormalActionSellCrypto, NormalActionSellNft, NormalActionSendToCex, NormalActionSpam, NormalActionStake, NormalActionSwapNft, NormalActionTrade, NormalActionTransactionFee, NormalActionTransfer, NormalActionUnstake, NormalActionUnwrap, NormalActionValuedown, NormalActionValueup, NormalActionWithdraw, NormalActionWithdrawWithBond, NormalActionWrap, Transfer, TransferCryptoCurrencyIn, TransferCryptoCurrencyNone, TransferCryptoCurrencyOut, TransferFiatCurrencyIn, TransferFiatCurrencyNone, TransferFiatCurrencyOut, TransferIn, TransferNftIn, TransferNftNone, TransferNftOut, TransferNone, TransferOut, } from './actions';
|
|
4
4
|
export { appCategories } from './apps';
|
|
5
5
|
export type { App, AppCategory } from './apps';
|
package/_types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,0BA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AAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACzC,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA"}
|
package/actions/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export {
|
|
|
29
29
|
parseNormalActionSpamToAccountActions,
|
|
30
30
|
parseNormalActionStakeToAccountActions,
|
|
31
31
|
parseNormalActionSwapNftToAccountActions,
|
|
32
|
+
parseNormalActionToAccountActions,
|
|
32
33
|
parseNormalActionTradeToAccountActions,
|
|
33
34
|
parseNormalActionTransactionFeeToAccountActions,
|
|
34
35
|
parseNormalActionTransferToAccountActions,
|
|
@@ -239,3 +240,14 @@ export type {
|
|
|
239
240
|
TransferNone,
|
|
240
241
|
TransferOut,
|
|
241
242
|
} from './types'
|
|
243
|
+
export {
|
|
244
|
+
isTransferCryptoCurrencyIn,
|
|
245
|
+
isTransferCryptoCurrencyNone,
|
|
246
|
+
isTransferCryptoCurrencyOut,
|
|
247
|
+
isTransferFiatCurrencyIn,
|
|
248
|
+
isTransferFiatCurrencyNone,
|
|
249
|
+
isTransferFiatCurrencyOut,
|
|
250
|
+
isTransferNftIn,
|
|
251
|
+
isTransferNftNone,
|
|
252
|
+
isTransferNftOut,
|
|
253
|
+
} from './utils'
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import type { AccountAction, NormalAction } from '../types'
|
|
2
|
+
import {
|
|
3
|
+
parseNormalActionBorrowToAccountActions,
|
|
4
|
+
parseNormalActionBorrowWithDebtToAccountActions,
|
|
5
|
+
} from './borrow'
|
|
6
|
+
import {
|
|
7
|
+
parseNormalActionBridgeFromToAccountActions,
|
|
8
|
+
parseNormalActionBridgeToToAccountActions,
|
|
9
|
+
parseNormalActionCrossReplaceToAccountActions,
|
|
10
|
+
} from './crossReplace'
|
|
11
|
+
import { parseNormalActionCrossTradeToAccountActions } from './crossTrade'
|
|
12
|
+
import {
|
|
13
|
+
parseNormalActionAddLiquidityToAccountActions,
|
|
14
|
+
parseNormalActionDepositToAccountActions,
|
|
15
|
+
parseNormalActionDepositWithBondToAccountActions,
|
|
16
|
+
parseNormalActionStakeToAccountActions,
|
|
17
|
+
} from './deposit'
|
|
18
|
+
import {
|
|
19
|
+
parseNormalActionFeeToAccountActions,
|
|
20
|
+
parseNormalActionTransactionFeeToAccountActions,
|
|
21
|
+
} from './fee'
|
|
22
|
+
import {
|
|
23
|
+
parseNormalActionApproveToAccountActions,
|
|
24
|
+
parseNormalActionFailTxToAccountActions,
|
|
25
|
+
parseNormalActionReceiveFromCexToAccountActions,
|
|
26
|
+
parseNormalActionRevokeToAccountActions,
|
|
27
|
+
parseNormalActionSendToCexToAccountActions,
|
|
28
|
+
parseNormalActionSpamToAccountActions,
|
|
29
|
+
} from './ignore'
|
|
30
|
+
import {
|
|
31
|
+
parseNormalActionAtomicArbitrageToAccountActions,
|
|
32
|
+
parseNormalActionFreeMintNftToAccountActions,
|
|
33
|
+
parseNormalActionIncomeToAccountActions,
|
|
34
|
+
} from './income'
|
|
35
|
+
import {
|
|
36
|
+
parseNormalActionRepaymentToAccountActions,
|
|
37
|
+
parseNormalActionRepaymentWithDebtToAccountActions,
|
|
38
|
+
} from './repayment'
|
|
39
|
+
import {
|
|
40
|
+
parseNormalActionReplaceToAccountActions,
|
|
41
|
+
parseNormalActionSwapNftToAccountActions,
|
|
42
|
+
parseNormalActionUnwrapToAccountActions,
|
|
43
|
+
parseNormalActionWrapToAccountActions,
|
|
44
|
+
} from './replace'
|
|
45
|
+
import {
|
|
46
|
+
parseNormalActionBuyCryptoToAccountActions,
|
|
47
|
+
parseNormalActionBuyNftToAccountActions,
|
|
48
|
+
parseNormalActionMintNftToAccountActions,
|
|
49
|
+
parseNormalActionSellCryptoToAccountActions,
|
|
50
|
+
parseNormalActionSellNftToAccountActions,
|
|
51
|
+
parseNormalActionTradeToAccountActions,
|
|
52
|
+
} from './trade'
|
|
53
|
+
import { parseNormalActionTransferToAccountActions } from './transfer'
|
|
54
|
+
import type { ParseNormalActionToAccountActionsParameters } from './types'
|
|
55
|
+
import { parseNormalActionValuedownToAccountActions } from './valuedown'
|
|
56
|
+
import { parseNormalActionValueupToAccountActions } from './valueup'
|
|
57
|
+
import {
|
|
58
|
+
parseNormalActionRemoveLiquidityToAccountActions,
|
|
59
|
+
parseNormalActionUnstakeToAccountActions,
|
|
60
|
+
parseNormalActionWithdrawToAccountActions,
|
|
61
|
+
parseNormalActionWithdrawWithBondToAccountActions,
|
|
62
|
+
} from './withdraw'
|
|
63
|
+
|
|
64
|
+
export const parseNormalActionToAccountActions = ({
|
|
65
|
+
action,
|
|
66
|
+
accountIds,
|
|
67
|
+
source,
|
|
68
|
+
cexAccountIds,
|
|
69
|
+
}: ParseNormalActionToAccountActionsParameters<NormalAction>): readonly AccountAction[] => {
|
|
70
|
+
switch (action.action) {
|
|
71
|
+
case 'add-liquidity': {
|
|
72
|
+
return parseNormalActionAddLiquidityToAccountActions({
|
|
73
|
+
action,
|
|
74
|
+
accountIds,
|
|
75
|
+
source,
|
|
76
|
+
cexAccountIds,
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
case 'approve': {
|
|
80
|
+
return parseNormalActionApproveToAccountActions({
|
|
81
|
+
action,
|
|
82
|
+
accountIds,
|
|
83
|
+
source,
|
|
84
|
+
cexAccountIds,
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
case 'atomic-arbitrage': {
|
|
88
|
+
return parseNormalActionAtomicArbitrageToAccountActions({
|
|
89
|
+
action,
|
|
90
|
+
accountIds,
|
|
91
|
+
source,
|
|
92
|
+
cexAccountIds,
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
case 'borrow': {
|
|
96
|
+
return parseNormalActionBorrowToAccountActions({
|
|
97
|
+
action,
|
|
98
|
+
accountIds,
|
|
99
|
+
source,
|
|
100
|
+
cexAccountIds,
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
case 'bridge-from': {
|
|
104
|
+
return parseNormalActionBridgeFromToAccountActions({
|
|
105
|
+
action,
|
|
106
|
+
accountIds,
|
|
107
|
+
source,
|
|
108
|
+
cexAccountIds,
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
case 'bridge-to': {
|
|
112
|
+
return parseNormalActionBridgeToToAccountActions({
|
|
113
|
+
action,
|
|
114
|
+
accountIds,
|
|
115
|
+
source,
|
|
116
|
+
cexAccountIds,
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
case 'buy-crypto': {
|
|
120
|
+
return parseNormalActionBuyCryptoToAccountActions({
|
|
121
|
+
action,
|
|
122
|
+
accountIds,
|
|
123
|
+
source,
|
|
124
|
+
cexAccountIds,
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
case 'buy-nft': {
|
|
128
|
+
return parseNormalActionBuyNftToAccountActions({
|
|
129
|
+
action,
|
|
130
|
+
accountIds,
|
|
131
|
+
source,
|
|
132
|
+
cexAccountIds,
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
case 'cross-replace': {
|
|
136
|
+
return parseNormalActionCrossReplaceToAccountActions({
|
|
137
|
+
action,
|
|
138
|
+
accountIds,
|
|
139
|
+
source,
|
|
140
|
+
cexAccountIds,
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
case 'cross-trade': {
|
|
144
|
+
return parseNormalActionCrossTradeToAccountActions({
|
|
145
|
+
action,
|
|
146
|
+
accountIds,
|
|
147
|
+
source,
|
|
148
|
+
cexAccountIds,
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
case 'deposit': {
|
|
152
|
+
return parseNormalActionDepositToAccountActions({
|
|
153
|
+
action,
|
|
154
|
+
accountIds,
|
|
155
|
+
source,
|
|
156
|
+
cexAccountIds,
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
case 'fail-tx': {
|
|
160
|
+
return parseNormalActionFailTxToAccountActions({
|
|
161
|
+
action,
|
|
162
|
+
accountIds,
|
|
163
|
+
source,
|
|
164
|
+
cexAccountIds,
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
case 'fee': {
|
|
168
|
+
return parseNormalActionFeeToAccountActions({
|
|
169
|
+
action,
|
|
170
|
+
accountIds,
|
|
171
|
+
source,
|
|
172
|
+
cexAccountIds,
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
case 'free-mint-nft': {
|
|
176
|
+
return parseNormalActionFreeMintNftToAccountActions({
|
|
177
|
+
action,
|
|
178
|
+
accountIds,
|
|
179
|
+
source,
|
|
180
|
+
cexAccountIds,
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
case 'income': {
|
|
184
|
+
return parseNormalActionIncomeToAccountActions({
|
|
185
|
+
action,
|
|
186
|
+
accountIds,
|
|
187
|
+
source,
|
|
188
|
+
cexAccountIds,
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
case 'mint-nft': {
|
|
192
|
+
return parseNormalActionMintNftToAccountActions({
|
|
193
|
+
action,
|
|
194
|
+
accountIds,
|
|
195
|
+
source,
|
|
196
|
+
cexAccountIds,
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
case 'receive-from-cex': {
|
|
200
|
+
return parseNormalActionReceiveFromCexToAccountActions({
|
|
201
|
+
action,
|
|
202
|
+
accountIds,
|
|
203
|
+
source,
|
|
204
|
+
cexAccountIds,
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
case 'repayment': {
|
|
208
|
+
return parseNormalActionRepaymentToAccountActions({
|
|
209
|
+
action,
|
|
210
|
+
accountIds,
|
|
211
|
+
source,
|
|
212
|
+
cexAccountIds,
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
case 'repayment-with-debt': {
|
|
216
|
+
return parseNormalActionRepaymentWithDebtToAccountActions({
|
|
217
|
+
action,
|
|
218
|
+
accountIds,
|
|
219
|
+
source,
|
|
220
|
+
cexAccountIds,
|
|
221
|
+
})
|
|
222
|
+
}
|
|
223
|
+
case 'replace': {
|
|
224
|
+
return parseNormalActionReplaceToAccountActions({
|
|
225
|
+
action,
|
|
226
|
+
accountIds,
|
|
227
|
+
source,
|
|
228
|
+
cexAccountIds,
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
case 'sell-crypto': {
|
|
232
|
+
return parseNormalActionSellCryptoToAccountActions({
|
|
233
|
+
action,
|
|
234
|
+
accountIds,
|
|
235
|
+
source,
|
|
236
|
+
cexAccountIds,
|
|
237
|
+
})
|
|
238
|
+
}
|
|
239
|
+
case 'sell-nft': {
|
|
240
|
+
return parseNormalActionSellNftToAccountActions({
|
|
241
|
+
action,
|
|
242
|
+
accountIds,
|
|
243
|
+
source,
|
|
244
|
+
cexAccountIds,
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
case 'spam': {
|
|
248
|
+
return parseNormalActionSpamToAccountActions({
|
|
249
|
+
action,
|
|
250
|
+
accountIds,
|
|
251
|
+
source,
|
|
252
|
+
cexAccountIds,
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
case 'stake': {
|
|
256
|
+
return parseNormalActionStakeToAccountActions({
|
|
257
|
+
action,
|
|
258
|
+
accountIds,
|
|
259
|
+
source,
|
|
260
|
+
cexAccountIds,
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
case 'borrow-with-debt': {
|
|
264
|
+
return parseNormalActionBorrowWithDebtToAccountActions({
|
|
265
|
+
action,
|
|
266
|
+
accountIds,
|
|
267
|
+
source,
|
|
268
|
+
cexAccountIds,
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
case 'swap-nft': {
|
|
272
|
+
return parseNormalActionSwapNftToAccountActions({
|
|
273
|
+
action,
|
|
274
|
+
accountIds,
|
|
275
|
+
source,
|
|
276
|
+
cexAccountIds,
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
case 'transaction-fee': {
|
|
280
|
+
return parseNormalActionTransactionFeeToAccountActions({
|
|
281
|
+
action,
|
|
282
|
+
accountIds,
|
|
283
|
+
source,
|
|
284
|
+
cexAccountIds,
|
|
285
|
+
})
|
|
286
|
+
}
|
|
287
|
+
case 'trade': {
|
|
288
|
+
return parseNormalActionTradeToAccountActions({
|
|
289
|
+
action,
|
|
290
|
+
accountIds,
|
|
291
|
+
source,
|
|
292
|
+
cexAccountIds,
|
|
293
|
+
})
|
|
294
|
+
}
|
|
295
|
+
case 'transfer': {
|
|
296
|
+
return parseNormalActionTransferToAccountActions({
|
|
297
|
+
action,
|
|
298
|
+
accountIds,
|
|
299
|
+
source,
|
|
300
|
+
cexAccountIds,
|
|
301
|
+
})
|
|
302
|
+
}
|
|
303
|
+
case 'unstake': {
|
|
304
|
+
return parseNormalActionUnstakeToAccountActions({
|
|
305
|
+
action,
|
|
306
|
+
accountIds,
|
|
307
|
+
source,
|
|
308
|
+
cexAccountIds,
|
|
309
|
+
})
|
|
310
|
+
}
|
|
311
|
+
case 'unwrap': {
|
|
312
|
+
return parseNormalActionUnwrapToAccountActions({
|
|
313
|
+
action,
|
|
314
|
+
accountIds,
|
|
315
|
+
source,
|
|
316
|
+
cexAccountIds,
|
|
317
|
+
})
|
|
318
|
+
}
|
|
319
|
+
case 'valuedown': {
|
|
320
|
+
return parseNormalActionValuedownToAccountActions({
|
|
321
|
+
action,
|
|
322
|
+
accountIds,
|
|
323
|
+
source,
|
|
324
|
+
cexAccountIds,
|
|
325
|
+
})
|
|
326
|
+
}
|
|
327
|
+
case 'valueup': {
|
|
328
|
+
return parseNormalActionValueupToAccountActions({
|
|
329
|
+
action,
|
|
330
|
+
accountIds,
|
|
331
|
+
source,
|
|
332
|
+
cexAccountIds,
|
|
333
|
+
})
|
|
334
|
+
}
|
|
335
|
+
case 'withdraw': {
|
|
336
|
+
return parseNormalActionWithdrawToAccountActions({
|
|
337
|
+
action,
|
|
338
|
+
accountIds,
|
|
339
|
+
source,
|
|
340
|
+
cexAccountIds,
|
|
341
|
+
})
|
|
342
|
+
}
|
|
343
|
+
case 'withdraw-with-bond': {
|
|
344
|
+
return parseNormalActionWithdrawWithBondToAccountActions({
|
|
345
|
+
action,
|
|
346
|
+
accountIds,
|
|
347
|
+
source,
|
|
348
|
+
cexAccountIds,
|
|
349
|
+
})
|
|
350
|
+
}
|
|
351
|
+
case 'wrap': {
|
|
352
|
+
return parseNormalActionWrapToAccountActions({
|
|
353
|
+
action,
|
|
354
|
+
accountIds,
|
|
355
|
+
source,
|
|
356
|
+
cexAccountIds,
|
|
357
|
+
})
|
|
358
|
+
}
|
|
359
|
+
case 'revoke': {
|
|
360
|
+
return parseNormalActionRevokeToAccountActions({
|
|
361
|
+
action,
|
|
362
|
+
accountIds,
|
|
363
|
+
source,
|
|
364
|
+
cexAccountIds,
|
|
365
|
+
})
|
|
366
|
+
}
|
|
367
|
+
case 'send-to-cex': {
|
|
368
|
+
return parseNormalActionSendToCexToAccountActions({
|
|
369
|
+
action,
|
|
370
|
+
accountIds,
|
|
371
|
+
source,
|
|
372
|
+
cexAccountIds,
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
case 'remove-liquidity': {
|
|
376
|
+
return parseNormalActionRemoveLiquidityToAccountActions({
|
|
377
|
+
action,
|
|
378
|
+
accountIds,
|
|
379
|
+
source,
|
|
380
|
+
cexAccountIds,
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
case 'deposit-with-bond': {
|
|
384
|
+
return parseNormalActionDepositWithBondToAccountActions({
|
|
385
|
+
action,
|
|
386
|
+
accountIds,
|
|
387
|
+
source,
|
|
388
|
+
cexAccountIds,
|
|
389
|
+
})
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
package/actions/parsers/index.ts
CHANGED