@0xtorch/core 0.0.15 → 0.0.17
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 +3 -1
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/parsers/borrow/borrow.js +1 -0
- package/_cjs/actions/parsers/borrow/borrow.js.map +1 -1
- package/_cjs/actions/parsers/borrow/borrowWithDebt.js +1 -0
- package/_cjs/actions/parsers/borrow/borrowWithDebt.js.map +1 -1
- package/_cjs/actions/parsers/crossReplace/bridgeFrom.js +1 -0
- package/_cjs/actions/parsers/crossReplace/bridgeFrom.js.map +1 -1
- package/_cjs/actions/parsers/crossReplace/bridgeTo.js +1 -0
- package/_cjs/actions/parsers/crossReplace/bridgeTo.js.map +1 -1
- package/_cjs/actions/parsers/crossReplace/crossReplace.js +1 -0
- package/_cjs/actions/parsers/crossReplace/crossReplace.js.map +1 -1
- package/_cjs/actions/parsers/crossTrade/crossTrade.js +1 -0
- package/_cjs/actions/parsers/crossTrade/crossTrade.js.map +1 -1
- package/_cjs/actions/parsers/deposit/addLiquidity.js +1 -0
- package/_cjs/actions/parsers/deposit/addLiquidity.js.map +1 -1
- package/_cjs/actions/parsers/deposit/deposit.js +1 -0
- package/_cjs/actions/parsers/deposit/deposit.js.map +1 -1
- package/_cjs/actions/parsers/deposit/depositWithBond.js +1 -0
- package/_cjs/actions/parsers/deposit/depositWithBond.js.map +1 -1
- package/_cjs/actions/parsers/deposit/stake.js +1 -0
- package/_cjs/actions/parsers/deposit/stake.js.map +1 -1
- package/_cjs/actions/parsers/fee/fee.js +2 -0
- package/_cjs/actions/parsers/fee/fee.js.map +1 -1
- package/_cjs/actions/parsers/fee/transactionFee.js +1 -0
- package/_cjs/actions/parsers/fee/transactionFee.js.map +1 -1
- package/_cjs/actions/parsers/ignore/approve.js +1 -0
- package/_cjs/actions/parsers/ignore/approve.js.map +1 -1
- package/_cjs/actions/parsers/ignore/failTx.js +1 -0
- package/_cjs/actions/parsers/ignore/failTx.js.map +1 -1
- package/_cjs/actions/parsers/ignore/revoke.js +1 -0
- package/_cjs/actions/parsers/ignore/revoke.js.map +1 -1
- package/_cjs/actions/parsers/ignore/spam.js +1 -0
- package/_cjs/actions/parsers/ignore/spam.js.map +1 -1
- package/_cjs/actions/parsers/income/atomicArbitrage.js +3 -0
- package/_cjs/actions/parsers/income/atomicArbitrage.js.map +1 -1
- package/_cjs/actions/parsers/income/freeMintNft.js +1 -0
- package/_cjs/actions/parsers/income/freeMintNft.js.map +1 -1
- package/_cjs/actions/parsers/income/income.js +1 -0
- package/_cjs/actions/parsers/income/income.js.map +1 -1
- package/_cjs/actions/parsers/repayment/repayment.js +1 -0
- package/_cjs/actions/parsers/repayment/repayment.js.map +1 -1
- package/_cjs/actions/parsers/repayment/repaymentWithDebt.js +1 -0
- package/_cjs/actions/parsers/repayment/repaymentWithDebt.js.map +1 -1
- package/_cjs/actions/parsers/replace/replace.js +1 -0
- package/_cjs/actions/parsers/replace/replace.js.map +1 -1
- package/_cjs/actions/parsers/replace/swapNft.js +1 -0
- package/_cjs/actions/parsers/replace/swapNft.js.map +1 -1
- package/_cjs/actions/parsers/replace/unwrap.js +1 -0
- package/_cjs/actions/parsers/replace/unwrap.js.map +1 -1
- package/_cjs/actions/parsers/replace/wrap.js +1 -0
- package/_cjs/actions/parsers/replace/wrap.js.map +1 -1
- package/_cjs/actions/parsers/trade/buyCrypto.js +2 -0
- package/_cjs/actions/parsers/trade/buyCrypto.js.map +1 -1
- package/_cjs/actions/parsers/trade/buyNft.js +5 -0
- package/_cjs/actions/parsers/trade/buyNft.js.map +1 -1
- package/_cjs/actions/parsers/trade/mintNft.js +3 -0
- package/_cjs/actions/parsers/trade/mintNft.js.map +1 -1
- package/_cjs/actions/parsers/trade/sellCrypto.js +2 -0
- package/_cjs/actions/parsers/trade/sellCrypto.js.map +1 -1
- package/_cjs/actions/parsers/trade/sellNft.js +5 -0
- package/_cjs/actions/parsers/trade/sellNft.js.map +1 -1
- package/_cjs/actions/parsers/trade/trade.js +8 -0
- package/_cjs/actions/parsers/trade/trade.js.map +1 -1
- package/_cjs/actions/parsers/valuedown/valuedown.js +1 -0
- package/_cjs/actions/parsers/valuedown/valuedown.js.map +1 -1
- package/_cjs/actions/parsers/valueup/valueup.js +1 -0
- package/_cjs/actions/parsers/valueup/valueup.js.map +1 -1
- package/_cjs/actions/parsers/withdraw/removeLiquidity.js +1 -0
- package/_cjs/actions/parsers/withdraw/removeLiquidity.js.map +1 -1
- package/_cjs/actions/parsers/withdraw/unstake.js +1 -0
- package/_cjs/actions/parsers/withdraw/unstake.js.map +1 -1
- package/_cjs/actions/parsers/withdraw/withdraw.js +1 -0
- package/_cjs/actions/parsers/withdraw/withdraw.js.map +1 -1
- package/_cjs/actions/parsers/withdraw/withdrawWithBond.js +1 -0
- package/_cjs/actions/parsers/withdraw/withdrawWithBond.js.map +1 -1
- package/_cjs/actions/utils.js +1318 -1
- package/_cjs/actions/utils.js.map +1 -1
- package/_cjs/index.js +3 -1
- package/_cjs/index.js.map +1 -1
- package/_esm/actions/index.js +1 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/parsers/borrow/borrow.js +1 -0
- package/_esm/actions/parsers/borrow/borrow.js.map +1 -1
- package/_esm/actions/parsers/borrow/borrowWithDebt.js +1 -0
- package/_esm/actions/parsers/borrow/borrowWithDebt.js.map +1 -1
- package/_esm/actions/parsers/crossReplace/bridgeFrom.js +1 -0
- package/_esm/actions/parsers/crossReplace/bridgeFrom.js.map +1 -1
- package/_esm/actions/parsers/crossReplace/bridgeTo.js +1 -0
- package/_esm/actions/parsers/crossReplace/bridgeTo.js.map +1 -1
- package/_esm/actions/parsers/crossReplace/crossReplace.js +1 -0
- package/_esm/actions/parsers/crossReplace/crossReplace.js.map +1 -1
- package/_esm/actions/parsers/crossTrade/crossTrade.js +1 -0
- package/_esm/actions/parsers/crossTrade/crossTrade.js.map +1 -1
- package/_esm/actions/parsers/deposit/addLiquidity.js +1 -0
- package/_esm/actions/parsers/deposit/addLiquidity.js.map +1 -1
- package/_esm/actions/parsers/deposit/deposit.js +1 -0
- package/_esm/actions/parsers/deposit/deposit.js.map +1 -1
- package/_esm/actions/parsers/deposit/depositWithBond.js +1 -0
- package/_esm/actions/parsers/deposit/depositWithBond.js.map +1 -1
- package/_esm/actions/parsers/deposit/stake.js +1 -0
- package/_esm/actions/parsers/deposit/stake.js.map +1 -1
- package/_esm/actions/parsers/fee/fee.js +2 -0
- package/_esm/actions/parsers/fee/fee.js.map +1 -1
- package/_esm/actions/parsers/fee/transactionFee.js +1 -0
- package/_esm/actions/parsers/fee/transactionFee.js.map +1 -1
- package/_esm/actions/parsers/ignore/approve.js +1 -0
- package/_esm/actions/parsers/ignore/approve.js.map +1 -1
- package/_esm/actions/parsers/ignore/failTx.js +1 -0
- package/_esm/actions/parsers/ignore/failTx.js.map +1 -1
- package/_esm/actions/parsers/ignore/revoke.js +1 -0
- package/_esm/actions/parsers/ignore/revoke.js.map +1 -1
- package/_esm/actions/parsers/ignore/spam.js +1 -0
- package/_esm/actions/parsers/ignore/spam.js.map +1 -1
- package/_esm/actions/parsers/income/atomicArbitrage.js +3 -0
- package/_esm/actions/parsers/income/atomicArbitrage.js.map +1 -1
- package/_esm/actions/parsers/income/freeMintNft.js +1 -0
- package/_esm/actions/parsers/income/freeMintNft.js.map +1 -1
- package/_esm/actions/parsers/income/income.js +1 -0
- package/_esm/actions/parsers/income/income.js.map +1 -1
- package/_esm/actions/parsers/repayment/repayment.js +1 -0
- package/_esm/actions/parsers/repayment/repayment.js.map +1 -1
- package/_esm/actions/parsers/repayment/repaymentWithDebt.js +1 -0
- package/_esm/actions/parsers/repayment/repaymentWithDebt.js.map +1 -1
- package/_esm/actions/parsers/replace/replace.js +1 -0
- package/_esm/actions/parsers/replace/replace.js.map +1 -1
- package/_esm/actions/parsers/replace/swapNft.js +1 -0
- package/_esm/actions/parsers/replace/swapNft.js.map +1 -1
- package/_esm/actions/parsers/replace/unwrap.js +1 -0
- package/_esm/actions/parsers/replace/unwrap.js.map +1 -1
- package/_esm/actions/parsers/replace/wrap.js +1 -0
- package/_esm/actions/parsers/replace/wrap.js.map +1 -1
- package/_esm/actions/parsers/trade/buyCrypto.js +2 -0
- package/_esm/actions/parsers/trade/buyCrypto.js.map +1 -1
- package/_esm/actions/parsers/trade/buyNft.js +5 -0
- package/_esm/actions/parsers/trade/buyNft.js.map +1 -1
- package/_esm/actions/parsers/trade/mintNft.js +3 -0
- package/_esm/actions/parsers/trade/mintNft.js.map +1 -1
- package/_esm/actions/parsers/trade/sellCrypto.js +2 -0
- package/_esm/actions/parsers/trade/sellCrypto.js.map +1 -1
- package/_esm/actions/parsers/trade/sellNft.js +5 -0
- package/_esm/actions/parsers/trade/sellNft.js.map +1 -1
- package/_esm/actions/parsers/trade/trade.js +8 -0
- package/_esm/actions/parsers/trade/trade.js.map +1 -1
- package/_esm/actions/parsers/valuedown/valuedown.js +1 -0
- package/_esm/actions/parsers/valuedown/valuedown.js.map +1 -1
- package/_esm/actions/parsers/valueup/valueup.js +1 -0
- package/_esm/actions/parsers/valueup/valueup.js.map +1 -1
- package/_esm/actions/parsers/withdraw/removeLiquidity.js +1 -0
- package/_esm/actions/parsers/withdraw/removeLiquidity.js.map +1 -1
- package/_esm/actions/parsers/withdraw/unstake.js +1 -0
- package/_esm/actions/parsers/withdraw/unstake.js.map +1 -1
- package/_esm/actions/parsers/withdraw/withdraw.js +1 -0
- package/_esm/actions/parsers/withdraw/withdraw.js.map +1 -1
- package/_esm/actions/parsers/withdraw/withdrawWithBond.js +1 -0
- package/_esm/actions/parsers/withdraw/withdrawWithBond.js.map +1 -1
- package/_esm/actions/utils.js +1389 -0
- package/_esm/actions/utils.js.map +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_types/actions/index.d.ts +2 -2
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/parsers/borrow/borrow.d.ts.map +1 -1
- package/_types/actions/parsers/borrow/borrowWithDebt.d.ts.map +1 -1
- package/_types/actions/parsers/crossReplace/bridgeFrom.d.ts.map +1 -1
- package/_types/actions/parsers/crossReplace/bridgeTo.d.ts.map +1 -1
- package/_types/actions/parsers/crossReplace/crossReplace.d.ts.map +1 -1
- package/_types/actions/parsers/crossTrade/crossTrade.d.ts.map +1 -1
- package/_types/actions/parsers/default.d.ts +1 -1
- package/_types/actions/parsers/deposit/addLiquidity.d.ts.map +1 -1
- package/_types/actions/parsers/deposit/deposit.d.ts.map +1 -1
- package/_types/actions/parsers/deposit/depositWithBond.d.ts.map +1 -1
- package/_types/actions/parsers/deposit/stake.d.ts.map +1 -1
- package/_types/actions/parsers/fee/fee.d.ts.map +1 -1
- package/_types/actions/parsers/fee/transactionFee.d.ts.map +1 -1
- package/_types/actions/parsers/ignore/approve.d.ts.map +1 -1
- package/_types/actions/parsers/ignore/failTx.d.ts.map +1 -1
- package/_types/actions/parsers/ignore/revoke.d.ts.map +1 -1
- package/_types/actions/parsers/ignore/spam.d.ts.map +1 -1
- package/_types/actions/parsers/income/atomicArbitrage.d.ts.map +1 -1
- package/_types/actions/parsers/income/freeMintNft.d.ts.map +1 -1
- package/_types/actions/parsers/income/income.d.ts.map +1 -1
- package/_types/actions/parsers/repayment/repayment.d.ts.map +1 -1
- package/_types/actions/parsers/repayment/repaymentWithDebt.d.ts.map +1 -1
- package/_types/actions/parsers/replace/replace.d.ts.map +1 -1
- package/_types/actions/parsers/replace/swapNft.d.ts.map +1 -1
- package/_types/actions/parsers/replace/unwrap.d.ts.map +1 -1
- package/_types/actions/parsers/replace/wrap.d.ts.map +1 -1
- package/_types/actions/parsers/trade/buyCrypto.d.ts.map +1 -1
- package/_types/actions/parsers/trade/buyNft.d.ts.map +1 -1
- package/_types/actions/parsers/trade/mintNft.d.ts.map +1 -1
- package/_types/actions/parsers/trade/sellCrypto.d.ts.map +1 -1
- package/_types/actions/parsers/trade/sellNft.d.ts.map +1 -1
- package/_types/actions/parsers/trade/trade.d.ts.map +1 -1
- package/_types/actions/parsers/valuedown/valuedown.d.ts.map +1 -1
- package/_types/actions/parsers/valueup/valueup.d.ts.map +1 -1
- package/_types/actions/parsers/withdraw/removeLiquidity.d.ts.map +1 -1
- package/_types/actions/parsers/withdraw/unstake.d.ts.map +1 -1
- package/_types/actions/parsers/withdraw/withdraw.d.ts.map +1 -1
- package/_types/actions/parsers/withdraw/withdrawWithBond.d.ts.map +1 -1
- package/_types/actions/schemas/action.d.ts +950 -950
- package/_types/actions/schemas/borrow/borrow.d.ts +16 -16
- package/_types/actions/schemas/borrow/borrowWithDebt.d.ts +16 -16
- package/_types/actions/schemas/crossActionBundle.d.ts +40 -40
- package/_types/actions/schemas/crossReplace/bridgeFrom.d.ts +16 -16
- package/_types/actions/schemas/crossReplace/bridgeTo.d.ts +16 -16
- package/_types/actions/schemas/crossReplace/crossReplace.d.ts +16 -16
- package/_types/actions/schemas/crossTrade/crossTrade.d.ts +16 -16
- package/_types/actions/schemas/default/accountAction.d.ts +18 -18
- package/_types/actions/schemas/default/normalAction.d.ts +18 -18
- package/_types/actions/schemas/deposit/addLiquidity.d.ts +16 -16
- package/_types/actions/schemas/deposit/deposit.d.ts +16 -16
- package/_types/actions/schemas/deposit/depositWithBond.d.ts +16 -16
- package/_types/actions/schemas/deposit/stake.d.ts +16 -16
- package/_types/actions/schemas/fee/fee.d.ts +16 -16
- package/_types/actions/schemas/fee/transactionFee.d.ts +16 -16
- package/_types/actions/schemas/ignore/approve.d.ts +16 -16
- package/_types/actions/schemas/ignore/failTx.d.ts +16 -16
- package/_types/actions/schemas/ignore/ignore.d.ts +8 -8
- package/_types/actions/schemas/ignore/move.d.ts +8 -8
- package/_types/actions/schemas/ignore/receiveFromCex.d.ts +16 -16
- package/_types/actions/schemas/ignore/revoke.d.ts +16 -16
- package/_types/actions/schemas/ignore/sendToCex.d.ts +16 -16
- package/_types/actions/schemas/ignore/spam.d.ts +16 -16
- package/_types/actions/schemas/income/atomicArbitrage.d.ts +16 -16
- package/_types/actions/schemas/income/freeMintNft.d.ts +16 -16
- package/_types/actions/schemas/income/income.d.ts +16 -16
- package/_types/actions/schemas/income/nftRoyalty.d.ts +8 -8
- package/_types/actions/schemas/income/swapIncome.d.ts +8 -8
- package/_types/actions/schemas/reduce/reduce.d.ts +8 -8
- package/_types/actions/schemas/repayment/repayment.d.ts +16 -16
- package/_types/actions/schemas/repayment/repaymentWithDebt.d.ts +16 -16
- package/_types/actions/schemas/replace/replace.d.ts +16 -16
- package/_types/actions/schemas/replace/swapNft.d.ts +16 -16
- package/_types/actions/schemas/replace/unwrap.d.ts +16 -16
- package/_types/actions/schemas/replace/wrap.d.ts +16 -16
- package/_types/actions/schemas/trade/buyCrypto.d.ts +16 -16
- package/_types/actions/schemas/trade/buyNft.d.ts +16 -16
- package/_types/actions/schemas/trade/mintNft.d.ts +16 -16
- package/_types/actions/schemas/trade/sellCrypto.d.ts +16 -16
- package/_types/actions/schemas/trade/sellNft.d.ts +16 -16
- package/_types/actions/schemas/trade/trade.d.ts +16 -16
- package/_types/actions/schemas/transfer/swapTransfer.d.ts +8 -8
- package/_types/actions/schemas/transfer/transfer.d.ts +16 -16
- package/_types/actions/schemas/valuedown/valuedown.d.ts +16 -16
- package/_types/actions/schemas/valueup/valueup.d.ts +16 -16
- package/_types/actions/schemas/withdraw/removeLiquidity.d.ts +16 -16
- package/_types/actions/schemas/withdraw/unstake.d.ts +16 -16
- package/_types/actions/schemas/withdraw/withdraw.d.ts +16 -16
- package/_types/actions/schemas/withdraw/withdrawWithBond.d.ts +16 -16
- package/_types/actions/types/action.d.ts +17 -1
- package/_types/actions/types/action.d.ts.map +1 -1
- package/_types/actions/types/index.d.ts +1 -1
- package/_types/actions/types/index.d.ts.map +1 -1
- package/_types/actions/utils.d.ts +3 -0
- package/_types/actions/utils.d.ts.map +1 -1
- package/_types/apps/schemas.d.ts +4 -4
- package/_types/index.d.ts +2 -2
- package/_types/index.d.ts.map +1 -1
- package/actions/index.ts +4 -0
- package/actions/parsers/borrow/borrow.ts +1 -0
- package/actions/parsers/borrow/borrowWithDebt.ts +1 -0
- package/actions/parsers/crossReplace/bridgeFrom.ts +1 -0
- package/actions/parsers/crossReplace/bridgeTo.ts +1 -0
- package/actions/parsers/crossReplace/crossReplace.ts +1 -0
- package/actions/parsers/crossTrade/crossTrade.ts +1 -0
- package/actions/parsers/deposit/addLiquidity.ts +1 -0
- package/actions/parsers/deposit/deposit.ts +1 -0
- package/actions/parsers/deposit/depositWithBond.ts +1 -0
- package/actions/parsers/deposit/stake.ts +1 -0
- package/actions/parsers/fee/fee.ts +2 -0
- package/actions/parsers/fee/transactionFee.ts +1 -0
- package/actions/parsers/ignore/approve.ts +1 -0
- package/actions/parsers/ignore/failTx.ts +1 -0
- package/actions/parsers/ignore/revoke.ts +1 -0
- package/actions/parsers/ignore/spam.ts +1 -0
- package/actions/parsers/income/atomicArbitrage.ts +3 -0
- package/actions/parsers/income/freeMintNft.ts +1 -0
- package/actions/parsers/income/income.ts +1 -0
- package/actions/parsers/repayment/repayment.ts +1 -0
- package/actions/parsers/repayment/repaymentWithDebt.ts +1 -0
- package/actions/parsers/replace/replace.ts +1 -0
- package/actions/parsers/replace/swapNft.ts +1 -0
- package/actions/parsers/replace/unwrap.ts +1 -0
- package/actions/parsers/replace/wrap.ts +1 -0
- package/actions/parsers/trade/buyCrypto.ts +2 -0
- package/actions/parsers/trade/buyNft.ts +5 -0
- package/actions/parsers/trade/mintNft.ts +3 -0
- package/actions/parsers/trade/sellCrypto.ts +2 -0
- package/actions/parsers/trade/sellNft.ts +5 -0
- package/actions/parsers/trade/trade.ts +8 -0
- package/actions/parsers/valuedown/valuedown.ts +1 -0
- package/actions/parsers/valueup/valueup.ts +1 -0
- package/actions/parsers/withdraw/removeLiquidity.ts +1 -0
- package/actions/parsers/withdraw/unstake.ts +1 -0
- package/actions/parsers/withdraw/withdraw.ts +1 -0
- package/actions/parsers/withdraw/withdrawWithBond.ts +1 -0
- package/actions/types/action.ts +26 -1
- package/actions/types/index.ts +2 -0
- package/actions/utils.ts +1951 -0
- package/index.ts +4 -0
- package/package.json +1 -1
package/_cjs/actions/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTransferFiatCurrencyNone = exports.isTransferFiatCurrencyOut = exports.isTransferFiatCurrencyIn = exports.isTransferNftNone = exports.isTransferNftOut = exports.isTransferNftIn = exports.isTransferCryptoCurrencyNone = exports.isTransferCryptoCurrencyOut = exports.isTransferCryptoCurrencyIn = void 0;
|
|
3
|
+
exports.parseBaseAccountActionToAccountAction = exports.parseBaseNormalActionToNormalAction = exports.isTransferFiatCurrencyNone = exports.isTransferFiatCurrencyOut = exports.isTransferFiatCurrencyIn = exports.isTransferNftNone = exports.isTransferNftOut = exports.isTransferNftIn = exports.isTransferCryptoCurrencyNone = exports.isTransferCryptoCurrencyOut = exports.isTransferCryptoCurrencyIn = void 0;
|
|
4
4
|
const isTransferCryptoCurrencyIn = (transfer) => transfer.direction === 'in' && transfer.asset.type === 'CryptoCurrency';
|
|
5
5
|
exports.isTransferCryptoCurrencyIn = isTransferCryptoCurrencyIn;
|
|
6
6
|
const isTransferCryptoCurrencyOut = (transfer) => transfer.direction === 'out' && transfer.asset.type === 'CryptoCurrency';
|
|
@@ -19,4 +19,1321 @@ const isTransferFiatCurrencyOut = (transfer) => transfer.direction === 'out' &&
|
|
|
19
19
|
exports.isTransferFiatCurrencyOut = isTransferFiatCurrencyOut;
|
|
20
20
|
const isTransferFiatCurrencyNone = (transfer) => transfer.direction === 'none' && transfer.asset.type === 'FiatCurrency';
|
|
21
21
|
exports.isTransferFiatCurrencyNone = isTransferFiatCurrencyNone;
|
|
22
|
+
const parseBaseNormalActionToNormalAction = (action) => {
|
|
23
|
+
switch (action.action) {
|
|
24
|
+
case 'add-liquidity': {
|
|
25
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
26
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
27
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
28
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
29
|
+
if (transfers.length !== action.transfers.length) {
|
|
30
|
+
throw new Error('Invalid action.transfers for add-liquidity');
|
|
31
|
+
}
|
|
32
|
+
if (action.loanId === undefined) {
|
|
33
|
+
throw new Error('action.loandId is required for add-liquidity');
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
...action,
|
|
37
|
+
type: 'LoanNormalAction',
|
|
38
|
+
action: 'add-liquidity',
|
|
39
|
+
loanId: action.loanId,
|
|
40
|
+
transfers,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
case 'approve': {
|
|
44
|
+
if (action.transfers.length > 0) {
|
|
45
|
+
throw new Error('Invalid action.transfers for approve');
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
...action,
|
|
49
|
+
type: 'NormalAction',
|
|
50
|
+
action: 'approve',
|
|
51
|
+
transfers: [],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
case 'atomic-arbitrage': {
|
|
55
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
56
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
57
|
+
if (transfers.length !== action.transfers.length) {
|
|
58
|
+
throw new Error('Invalid action.transfers for atomic-arbitrage');
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
...action,
|
|
62
|
+
type: 'NormalAction',
|
|
63
|
+
action: 'atomic-arbitrage',
|
|
64
|
+
transfers,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
case 'borrow': {
|
|
68
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
69
|
+
if (transfers.length !== action.transfers.length) {
|
|
70
|
+
throw new Error('Invalid action.transfers for borrow');
|
|
71
|
+
}
|
|
72
|
+
if (action.loanId === undefined) {
|
|
73
|
+
throw new Error('action.loandId is required for borrow');
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
...action,
|
|
77
|
+
type: 'LoanNormalAction',
|
|
78
|
+
action: 'borrow',
|
|
79
|
+
loanId: action.loanId,
|
|
80
|
+
transfers,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
case 'borrow-with-debt': {
|
|
84
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
85
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
86
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
87
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
88
|
+
if (transfers.length !== action.transfers.length) {
|
|
89
|
+
throw new Error('Invalid action.transfers for borrow-with-debt');
|
|
90
|
+
}
|
|
91
|
+
if (action.loanId === undefined) {
|
|
92
|
+
throw new Error('action.loandId is required for borrow-with-debt');
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
...action,
|
|
96
|
+
type: 'LoanNormalAction',
|
|
97
|
+
action: 'borrow-with-debt',
|
|
98
|
+
loanId: action.loanId,
|
|
99
|
+
transfers,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
case 'bridge-from': {
|
|
103
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
104
|
+
if (transfers.length !== action.transfers.length) {
|
|
105
|
+
throw new Error('Invalid action.transfers for bridge-from');
|
|
106
|
+
}
|
|
107
|
+
if (action.crossId === undefined) {
|
|
108
|
+
throw new Error('action.crossId is required for bridge-from');
|
|
109
|
+
}
|
|
110
|
+
if (action.crossType === undefined) {
|
|
111
|
+
throw new Error('action.crossType is required for bridge-from');
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
...action,
|
|
115
|
+
type: 'CrossNormalAction',
|
|
116
|
+
action: 'bridge-from',
|
|
117
|
+
crossId: action.crossId,
|
|
118
|
+
crossType: action.crossType,
|
|
119
|
+
transfers,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
case 'bridge-to': {
|
|
123
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
124
|
+
if (transfers.length !== action.transfers.length) {
|
|
125
|
+
throw new Error('Invalid action.transfers for bridge-to');
|
|
126
|
+
}
|
|
127
|
+
if (action.crossId === undefined) {
|
|
128
|
+
throw new Error('action.crossId is required for bridge-to');
|
|
129
|
+
}
|
|
130
|
+
if (action.crossType === undefined) {
|
|
131
|
+
throw new Error('action.crossType is required for bridge-to');
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
...action,
|
|
135
|
+
type: 'CrossNormalAction',
|
|
136
|
+
action: 'bridge-to',
|
|
137
|
+
crossId: action.crossId,
|
|
138
|
+
crossType: action.crossType,
|
|
139
|
+
transfers,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
case 'buy-crypto': {
|
|
143
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
144
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
145
|
+
if (transfers.length !== action.transfers.length) {
|
|
146
|
+
throw new Error('Invalid action.transfers for buy-crypto');
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
...action,
|
|
150
|
+
type: 'NormalAction',
|
|
151
|
+
action: 'buy-crypto',
|
|
152
|
+
transfers,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
case 'buy-nft': {
|
|
156
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) ||
|
|
157
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer) ||
|
|
158
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
159
|
+
if (transfers.length !== action.transfers.length) {
|
|
160
|
+
throw new Error('Invalid action.transfers for buy-nft');
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
...action,
|
|
164
|
+
type: 'NormalAction',
|
|
165
|
+
action: 'buy-nft',
|
|
166
|
+
transfers,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
case 'cross-replace': {
|
|
170
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
171
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
172
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
173
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
174
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
175
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
176
|
+
if (transfers.length !== action.transfers.length) {
|
|
177
|
+
throw new Error('Invalid action.transfers for cross-replace');
|
|
178
|
+
}
|
|
179
|
+
if (action.crossId === undefined) {
|
|
180
|
+
throw new Error('action.crossId is required for cross-replace');
|
|
181
|
+
}
|
|
182
|
+
if (action.crossType === undefined) {
|
|
183
|
+
throw new Error('action.crossType is required for cross-replace');
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
...action,
|
|
187
|
+
type: 'CrossNormalAction',
|
|
188
|
+
action: 'cross-replace',
|
|
189
|
+
crossId: action.crossId,
|
|
190
|
+
crossType: action.crossType,
|
|
191
|
+
transfers,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
case 'cross-trade': {
|
|
195
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
196
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
197
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
198
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
199
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
200
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
201
|
+
if (transfers.length !== action.transfers.length) {
|
|
202
|
+
throw new Error('Invalid action.transfers for cross-trade');
|
|
203
|
+
}
|
|
204
|
+
if (action.crossId === undefined) {
|
|
205
|
+
throw new Error('action.crossId is required for cross-trade');
|
|
206
|
+
}
|
|
207
|
+
if (action.crossType === undefined) {
|
|
208
|
+
throw new Error('action.crossType is required for cross-trade');
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
...action,
|
|
212
|
+
type: 'CrossNormalAction',
|
|
213
|
+
action: 'cross-trade',
|
|
214
|
+
crossId: action.crossId,
|
|
215
|
+
crossType: action.crossType,
|
|
216
|
+
transfers,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
case 'deposit': {
|
|
220
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
221
|
+
if (transfers.length !== action.transfers.length) {
|
|
222
|
+
throw new Error('Invalid action.transfers for deposit');
|
|
223
|
+
}
|
|
224
|
+
if (action.loanId === undefined) {
|
|
225
|
+
throw new Error('action.loandId is required for deposit');
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
...action,
|
|
229
|
+
type: 'LoanNormalAction',
|
|
230
|
+
action: 'deposit',
|
|
231
|
+
loanId: action.loanId,
|
|
232
|
+
transfers,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
case 'deposit-with-bond': {
|
|
236
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
237
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
238
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
239
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
240
|
+
if (transfers.length !== action.transfers.length) {
|
|
241
|
+
throw new Error('Invalid action.transfers for deposit-with-bond');
|
|
242
|
+
}
|
|
243
|
+
if (action.loanId === undefined) {
|
|
244
|
+
throw new Error('action.loandId is required for deposit-with-bond');
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
...action,
|
|
248
|
+
type: 'LoanNormalAction',
|
|
249
|
+
action: 'deposit-with-bond',
|
|
250
|
+
loanId: action.loanId,
|
|
251
|
+
transfers,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
case 'fail-tx': {
|
|
255
|
+
if (action.transfers.length > 0) {
|
|
256
|
+
throw new Error('Invalid action.transfers for fail-tx');
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
...action,
|
|
260
|
+
type: 'NormalAction',
|
|
261
|
+
action: 'fail-tx',
|
|
262
|
+
transfers: [],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
case 'fee': {
|
|
266
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
267
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
268
|
+
if (transfers.length !== action.transfers.length) {
|
|
269
|
+
throw new Error('Invalid action.transfers for fee');
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
...action,
|
|
273
|
+
type: 'NormalAction',
|
|
274
|
+
action: 'fee',
|
|
275
|
+
transfers,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
case 'free-mint-nft': {
|
|
279
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer));
|
|
280
|
+
if (transfers.length !== action.transfers.length) {
|
|
281
|
+
throw new Error('Invalid action.transfers for free-mint-nft');
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
...action,
|
|
285
|
+
type: 'NormalAction',
|
|
286
|
+
action: 'free-mint-nft',
|
|
287
|
+
transfers,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
case 'income': {
|
|
291
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
292
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
293
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer));
|
|
294
|
+
if (transfers.length !== action.transfers.length) {
|
|
295
|
+
throw new Error('Invalid action.transfers for income');
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
...action,
|
|
299
|
+
type: 'NormalAction',
|
|
300
|
+
action: 'income',
|
|
301
|
+
transfers,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
case 'mint-nft': {
|
|
305
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) ||
|
|
306
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer) ||
|
|
307
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
308
|
+
if (transfers.length !== action.transfers.length) {
|
|
309
|
+
throw new Error('Invalid action.transfers for mint-nft');
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
...action,
|
|
313
|
+
type: 'NormalAction',
|
|
314
|
+
action: 'mint-nft',
|
|
315
|
+
transfers,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
case 'receive-from-cex': {
|
|
319
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
320
|
+
if (transfers.length !== action.transfers.length) {
|
|
321
|
+
throw new Error('Invalid action.transfers for receive-from-cex');
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
...action,
|
|
325
|
+
type: 'NormalAction',
|
|
326
|
+
action: 'receive-from-cex',
|
|
327
|
+
transfers,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
case 'remove-liquidity': {
|
|
331
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
332
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
333
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
334
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
335
|
+
if (transfers.length !== action.transfers.length) {
|
|
336
|
+
throw new Error('Invalid action.transfers for remove-liquidity');
|
|
337
|
+
}
|
|
338
|
+
if (action.loanId === undefined) {
|
|
339
|
+
throw new Error('action.loandId is required for remove-liquidity');
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
...action,
|
|
343
|
+
type: 'LoanNormalAction',
|
|
344
|
+
action: 'remove-liquidity',
|
|
345
|
+
loanId: action.loanId,
|
|
346
|
+
transfers,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
case 'repayment': {
|
|
350
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
351
|
+
if (transfers.length !== action.transfers.length) {
|
|
352
|
+
throw new Error('Invalid action.transfers for repayment');
|
|
353
|
+
}
|
|
354
|
+
if (action.loanId === undefined) {
|
|
355
|
+
throw new Error('action.loandId is required for repayment');
|
|
356
|
+
}
|
|
357
|
+
return {
|
|
358
|
+
...action,
|
|
359
|
+
type: 'LoanNormalAction',
|
|
360
|
+
action: 'repayment',
|
|
361
|
+
loanId: action.loanId,
|
|
362
|
+
transfers,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
case 'repayment-with-debt': {
|
|
366
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
367
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
368
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
369
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
370
|
+
if (transfers.length !== action.transfers.length) {
|
|
371
|
+
throw new Error('Invalid action.transfers for repayment-with-debt');
|
|
372
|
+
}
|
|
373
|
+
if (action.loanId === undefined) {
|
|
374
|
+
throw new Error('action.loandId is required for repayment-with-debt');
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
...action,
|
|
378
|
+
type: 'LoanNormalAction',
|
|
379
|
+
action: 'repayment-with-debt',
|
|
380
|
+
loanId: action.loanId,
|
|
381
|
+
transfers,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
case 'replace': {
|
|
385
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
386
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
387
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
388
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
389
|
+
if (transfers.length !== action.transfers.length) {
|
|
390
|
+
throw new Error('Invalid action.transfers for replace');
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
...action,
|
|
394
|
+
type: 'NormalAction',
|
|
395
|
+
action: 'replace',
|
|
396
|
+
transfers,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
case 'revoke': {
|
|
400
|
+
if (action.transfers.length > 0) {
|
|
401
|
+
throw new Error('Invalid action.transfers for revoke');
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
...action,
|
|
405
|
+
type: 'NormalAction',
|
|
406
|
+
action: 'revoke',
|
|
407
|
+
transfers: [],
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
case 'sell-crypto': {
|
|
411
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
412
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
413
|
+
if (transfers.length !== action.transfers.length) {
|
|
414
|
+
throw new Error('Invalid action.transfers for sell-crypto');
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
...action,
|
|
418
|
+
type: 'NormalAction',
|
|
419
|
+
action: 'sell-crypto',
|
|
420
|
+
transfers,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
case 'sell-nft': {
|
|
424
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
425
|
+
(0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
426
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
427
|
+
if (transfers.length !== action.transfers.length) {
|
|
428
|
+
throw new Error('Invalid action.transfers for sell-nft');
|
|
429
|
+
}
|
|
430
|
+
return {
|
|
431
|
+
...action,
|
|
432
|
+
type: 'NormalAction',
|
|
433
|
+
action: 'sell-nft',
|
|
434
|
+
transfers,
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
case 'send-to-cex': {
|
|
438
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
439
|
+
if (transfers.length !== action.transfers.length) {
|
|
440
|
+
throw new Error('Invalid action.transfers for send-to-cex');
|
|
441
|
+
}
|
|
442
|
+
return {
|
|
443
|
+
...action,
|
|
444
|
+
type: 'NormalAction',
|
|
445
|
+
action: 'send-to-cex',
|
|
446
|
+
transfers,
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
case 'spam': {
|
|
450
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
451
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
452
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
453
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
454
|
+
if (transfers.length !== action.transfers.length) {
|
|
455
|
+
throw new Error('Invalid action.transfers for spam');
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
...action,
|
|
459
|
+
type: 'NormalAction',
|
|
460
|
+
action: 'spam',
|
|
461
|
+
transfers,
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
case 'stake': {
|
|
465
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
466
|
+
if (transfers.length !== action.transfers.length) {
|
|
467
|
+
throw new Error('Invalid action.transfers for stake');
|
|
468
|
+
}
|
|
469
|
+
if (action.loanId === undefined) {
|
|
470
|
+
throw new Error('action.loandId is required for stake');
|
|
471
|
+
}
|
|
472
|
+
return {
|
|
473
|
+
...action,
|
|
474
|
+
type: 'LoanNormalAction',
|
|
475
|
+
action: 'stake',
|
|
476
|
+
loanId: action.loanId,
|
|
477
|
+
transfers,
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
case 'swap-nft': {
|
|
481
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
482
|
+
if (transfers.length !== action.transfers.length) {
|
|
483
|
+
throw new Error('Invalid action.transfers for swap-nft');
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
...action,
|
|
487
|
+
type: 'NormalAction',
|
|
488
|
+
action: 'swap-nft',
|
|
489
|
+
transfers,
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
case 'transaction-fee': {
|
|
493
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
494
|
+
if (transfers.length !== action.transfers.length) {
|
|
495
|
+
throw new Error('Invalid action.transfers for transaction-fee');
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
...action,
|
|
499
|
+
type: 'NormalAction',
|
|
500
|
+
action: 'transaction-fee',
|
|
501
|
+
transfers,
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
case 'trade': {
|
|
505
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
506
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
507
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
508
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
509
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
510
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
511
|
+
if (transfers.length !== action.transfers.length) {
|
|
512
|
+
throw new Error('Invalid action.transfers for trade');
|
|
513
|
+
}
|
|
514
|
+
return {
|
|
515
|
+
...action,
|
|
516
|
+
type: 'NormalAction',
|
|
517
|
+
action: 'trade',
|
|
518
|
+
transfers,
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
case 'transfer': {
|
|
522
|
+
return {
|
|
523
|
+
...action,
|
|
524
|
+
type: 'NormalAction',
|
|
525
|
+
action: 'transfer',
|
|
526
|
+
transfers: [...action.transfers],
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
case 'unstake': {
|
|
530
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
531
|
+
if (transfers.length !== action.transfers.length) {
|
|
532
|
+
throw new Error('Invalid action.transfers for unstake');
|
|
533
|
+
}
|
|
534
|
+
if (action.loanId === undefined) {
|
|
535
|
+
throw new Error('action.loandId is required for unstake');
|
|
536
|
+
}
|
|
537
|
+
return {
|
|
538
|
+
...action,
|
|
539
|
+
type: 'LoanNormalAction',
|
|
540
|
+
action: 'unstake',
|
|
541
|
+
loanId: action.loanId,
|
|
542
|
+
transfers,
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
case 'unwrap': {
|
|
546
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
547
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
548
|
+
if (transfers.length !== action.transfers.length) {
|
|
549
|
+
throw new Error('Invalid action.transfers for unwrap');
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
...action,
|
|
553
|
+
type: 'NormalAction',
|
|
554
|
+
action: 'unwrap',
|
|
555
|
+
transfers,
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
case 'valuedown': {
|
|
559
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
560
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
561
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer));
|
|
562
|
+
if (transfers.length !== action.transfers.length) {
|
|
563
|
+
throw new Error('Invalid action.transfers for valuedown');
|
|
564
|
+
}
|
|
565
|
+
if (action.target === undefined) {
|
|
566
|
+
throw new Error('action.target is required for valuedown');
|
|
567
|
+
}
|
|
568
|
+
return {
|
|
569
|
+
...action,
|
|
570
|
+
type: 'NormalAction',
|
|
571
|
+
action: 'valuedown',
|
|
572
|
+
target: action.target,
|
|
573
|
+
transfers,
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
case 'valueup': {
|
|
577
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
578
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
579
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
580
|
+
if (transfers.length !== action.transfers.length) {
|
|
581
|
+
throw new Error('Invalid action.transfers for valueup');
|
|
582
|
+
}
|
|
583
|
+
if (action.target === undefined) {
|
|
584
|
+
throw new Error('action.target is required for valueup');
|
|
585
|
+
}
|
|
586
|
+
return {
|
|
587
|
+
...action,
|
|
588
|
+
type: 'NormalAction',
|
|
589
|
+
action: 'valueup',
|
|
590
|
+
target: action.target,
|
|
591
|
+
transfers,
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
case 'withdraw': {
|
|
595
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
596
|
+
if (transfers.length !== action.transfers.length) {
|
|
597
|
+
throw new Error('Invalid action.transfers for withdraw');
|
|
598
|
+
}
|
|
599
|
+
if (action.loanId === undefined) {
|
|
600
|
+
throw new Error('action.loandId is required for withdraw');
|
|
601
|
+
}
|
|
602
|
+
return {
|
|
603
|
+
...action,
|
|
604
|
+
type: 'LoanNormalAction',
|
|
605
|
+
action: 'withdraw',
|
|
606
|
+
loanId: action.loanId,
|
|
607
|
+
transfers,
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
case 'withdraw-with-bond': {
|
|
611
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
612
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
613
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
614
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
615
|
+
if (transfers.length !== action.transfers.length) {
|
|
616
|
+
throw new Error('Invalid action.transfers for withdraw-with-bond');
|
|
617
|
+
}
|
|
618
|
+
if (action.loanId === undefined) {
|
|
619
|
+
throw new Error('action.loandId is required for withdraw-with-bond');
|
|
620
|
+
}
|
|
621
|
+
return {
|
|
622
|
+
...action,
|
|
623
|
+
type: 'LoanNormalAction',
|
|
624
|
+
action: 'withdraw-with-bond',
|
|
625
|
+
loanId: action.loanId,
|
|
626
|
+
transfers,
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
case 'wrap': {
|
|
630
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
631
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
632
|
+
if (transfers.length !== action.transfers.length) {
|
|
633
|
+
throw new Error('Invalid action.transfers for wrap');
|
|
634
|
+
}
|
|
635
|
+
return {
|
|
636
|
+
...action,
|
|
637
|
+
type: 'NormalAction',
|
|
638
|
+
action: 'wrap',
|
|
639
|
+
transfers,
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
exports.parseBaseNormalActionToNormalAction = parseBaseNormalActionToNormalAction;
|
|
645
|
+
const parseBaseAccountActionToAccountAction = (action) => {
|
|
646
|
+
switch (action.action) {
|
|
647
|
+
case 'add-liquidity': {
|
|
648
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
649
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
650
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
651
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
652
|
+
if (transfers.length !== action.transfers.length) {
|
|
653
|
+
throw new Error('Invalid action.transfers for add-liquidity');
|
|
654
|
+
}
|
|
655
|
+
if (action.loanId === undefined) {
|
|
656
|
+
throw new Error('action.loandId is required for add-liquidity');
|
|
657
|
+
}
|
|
658
|
+
return {
|
|
659
|
+
...action,
|
|
660
|
+
type: 'LoanAccountAction',
|
|
661
|
+
action: 'add-liquidity',
|
|
662
|
+
loanId: action.loanId,
|
|
663
|
+
transfers,
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
case 'approve': {
|
|
667
|
+
if (action.transfers.length > 0) {
|
|
668
|
+
throw new Error('Invalid action.transfers for approve');
|
|
669
|
+
}
|
|
670
|
+
return {
|
|
671
|
+
...action,
|
|
672
|
+
type: 'NormalAccountAction',
|
|
673
|
+
action: 'approve',
|
|
674
|
+
transfers: [],
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
case 'atomic-arbitrage': {
|
|
678
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
679
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
680
|
+
if (transfers.length !== action.transfers.length) {
|
|
681
|
+
throw new Error('Invalid action.transfers for atomic-arbitrage');
|
|
682
|
+
}
|
|
683
|
+
return {
|
|
684
|
+
...action,
|
|
685
|
+
type: 'NormalAccountAction',
|
|
686
|
+
action: 'atomic-arbitrage',
|
|
687
|
+
transfers,
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
case 'borrow': {
|
|
691
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
692
|
+
if (transfers.length !== action.transfers.length) {
|
|
693
|
+
throw new Error('Invalid action.transfers for borrow');
|
|
694
|
+
}
|
|
695
|
+
if (action.loanId === undefined) {
|
|
696
|
+
throw new Error('action.loandId is required for borrow');
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
...action,
|
|
700
|
+
type: 'LoanAccountAction',
|
|
701
|
+
action: 'borrow',
|
|
702
|
+
loanId: action.loanId,
|
|
703
|
+
transfers,
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
case 'borrow-with-debt': {
|
|
707
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
708
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
709
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
710
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
711
|
+
if (transfers.length !== action.transfers.length) {
|
|
712
|
+
throw new Error('Invalid action.transfers for borrow-with-debt');
|
|
713
|
+
}
|
|
714
|
+
if (action.loanId === undefined) {
|
|
715
|
+
throw new Error('action.loandId is required for borrow-with-debt');
|
|
716
|
+
}
|
|
717
|
+
return {
|
|
718
|
+
...action,
|
|
719
|
+
type: 'LoanAccountAction',
|
|
720
|
+
action: 'borrow-with-debt',
|
|
721
|
+
loanId: action.loanId,
|
|
722
|
+
transfers,
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
case 'bridge-from': {
|
|
726
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
727
|
+
if (transfers.length !== action.transfers.length) {
|
|
728
|
+
throw new Error('Invalid action.transfers for bridge-from');
|
|
729
|
+
}
|
|
730
|
+
if (action.crossId === undefined) {
|
|
731
|
+
throw new Error('action.crossId is required for bridge-from');
|
|
732
|
+
}
|
|
733
|
+
if (action.crossType === undefined) {
|
|
734
|
+
throw new Error('action.crossType is required for bridge-from');
|
|
735
|
+
}
|
|
736
|
+
return {
|
|
737
|
+
...action,
|
|
738
|
+
type: 'CrossAccountAction',
|
|
739
|
+
action: 'bridge-from',
|
|
740
|
+
crossId: action.crossId,
|
|
741
|
+
crossType: action.crossType,
|
|
742
|
+
transfers,
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
case 'bridge-to': {
|
|
746
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
747
|
+
if (transfers.length !== action.transfers.length) {
|
|
748
|
+
throw new Error('Invalid action.transfers for bridge-to');
|
|
749
|
+
}
|
|
750
|
+
if (action.crossId === undefined) {
|
|
751
|
+
throw new Error('action.crossId is required for bridge-to');
|
|
752
|
+
}
|
|
753
|
+
if (action.crossType === undefined) {
|
|
754
|
+
throw new Error('action.crossType is required for bridge-to');
|
|
755
|
+
}
|
|
756
|
+
return {
|
|
757
|
+
...action,
|
|
758
|
+
type: 'CrossAccountAction',
|
|
759
|
+
action: 'bridge-to',
|
|
760
|
+
crossId: action.crossId,
|
|
761
|
+
crossType: action.crossType,
|
|
762
|
+
transfers,
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
case 'buy-crypto': {
|
|
766
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
767
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
768
|
+
if (transfers.length !== action.transfers.length) {
|
|
769
|
+
throw new Error('Invalid action.transfers for buy-crypto');
|
|
770
|
+
}
|
|
771
|
+
return {
|
|
772
|
+
...action,
|
|
773
|
+
type: 'NormalAccountAction',
|
|
774
|
+
action: 'buy-crypto',
|
|
775
|
+
transfers,
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
case 'buy-nft': {
|
|
779
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) ||
|
|
780
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer) ||
|
|
781
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
782
|
+
if (transfers.length !== action.transfers.length) {
|
|
783
|
+
throw new Error('Invalid action.transfers for buy-nft');
|
|
784
|
+
}
|
|
785
|
+
return {
|
|
786
|
+
...action,
|
|
787
|
+
type: 'NormalAccountAction',
|
|
788
|
+
action: 'buy-nft',
|
|
789
|
+
transfers,
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
case 'cross-replace': {
|
|
793
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
794
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
795
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
796
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
797
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
798
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
799
|
+
if (transfers.length !== action.transfers.length) {
|
|
800
|
+
throw new Error('Invalid action.transfers for cross-replace');
|
|
801
|
+
}
|
|
802
|
+
if (action.crossId === undefined) {
|
|
803
|
+
throw new Error('action.crossId is required for cross-replace');
|
|
804
|
+
}
|
|
805
|
+
if (action.crossType === undefined) {
|
|
806
|
+
throw new Error('action.crossType is required for cross-replace');
|
|
807
|
+
}
|
|
808
|
+
return {
|
|
809
|
+
...action,
|
|
810
|
+
type: 'CrossAccountAction',
|
|
811
|
+
action: 'cross-replace',
|
|
812
|
+
crossId: action.crossId,
|
|
813
|
+
crossType: action.crossType,
|
|
814
|
+
transfers,
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
case 'cross-trade': {
|
|
818
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
819
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
820
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
821
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
822
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
823
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
824
|
+
if (transfers.length !== action.transfers.length) {
|
|
825
|
+
throw new Error('Invalid action.transfers for cross-trade');
|
|
826
|
+
}
|
|
827
|
+
if (action.crossId === undefined) {
|
|
828
|
+
throw new Error('action.crossId is required for cross-trade');
|
|
829
|
+
}
|
|
830
|
+
if (action.crossType === undefined) {
|
|
831
|
+
throw new Error('action.crossType is required for cross-trade');
|
|
832
|
+
}
|
|
833
|
+
return {
|
|
834
|
+
...action,
|
|
835
|
+
type: 'CrossAccountAction',
|
|
836
|
+
action: 'cross-trade',
|
|
837
|
+
crossId: action.crossId,
|
|
838
|
+
crossType: action.crossType,
|
|
839
|
+
transfers,
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
case 'deposit': {
|
|
843
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
844
|
+
if (transfers.length !== action.transfers.length) {
|
|
845
|
+
throw new Error('Invalid action.transfers for deposit');
|
|
846
|
+
}
|
|
847
|
+
if (action.loanId === undefined) {
|
|
848
|
+
throw new Error('action.loandId is required for deposit');
|
|
849
|
+
}
|
|
850
|
+
return {
|
|
851
|
+
...action,
|
|
852
|
+
type: 'LoanAccountAction',
|
|
853
|
+
action: 'deposit',
|
|
854
|
+
loanId: action.loanId,
|
|
855
|
+
transfers,
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
case 'deposit-with-bond': {
|
|
859
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
860
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
861
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
862
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
863
|
+
if (transfers.length !== action.transfers.length) {
|
|
864
|
+
throw new Error('Invalid action.transfers for deposit-with-bond');
|
|
865
|
+
}
|
|
866
|
+
if (action.loanId === undefined) {
|
|
867
|
+
throw new Error('action.loandId is required for deposit-with-bond');
|
|
868
|
+
}
|
|
869
|
+
return {
|
|
870
|
+
...action,
|
|
871
|
+
type: 'LoanAccountAction',
|
|
872
|
+
action: 'deposit-with-bond',
|
|
873
|
+
loanId: action.loanId,
|
|
874
|
+
transfers,
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
case 'fail-tx': {
|
|
878
|
+
if (action.transfers.length > 0) {
|
|
879
|
+
throw new Error('Invalid action.transfers for fail-tx');
|
|
880
|
+
}
|
|
881
|
+
return {
|
|
882
|
+
...action,
|
|
883
|
+
type: 'NormalAccountAction',
|
|
884
|
+
action: 'fail-tx',
|
|
885
|
+
transfers: [],
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
case 'fee': {
|
|
889
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
890
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
891
|
+
if (transfers.length !== action.transfers.length) {
|
|
892
|
+
throw new Error('Invalid action.transfers for fee');
|
|
893
|
+
}
|
|
894
|
+
return {
|
|
895
|
+
...action,
|
|
896
|
+
type: 'NormalAccountAction',
|
|
897
|
+
action: 'fee',
|
|
898
|
+
transfers,
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
case 'free-mint-nft': {
|
|
902
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer));
|
|
903
|
+
if (transfers.length !== action.transfers.length) {
|
|
904
|
+
throw new Error('Invalid action.transfers for free-mint-nft');
|
|
905
|
+
}
|
|
906
|
+
return {
|
|
907
|
+
...action,
|
|
908
|
+
type: 'NormalAccountAction',
|
|
909
|
+
action: 'free-mint-nft',
|
|
910
|
+
transfers,
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
case 'ignore': {
|
|
914
|
+
return {
|
|
915
|
+
...action,
|
|
916
|
+
type: 'NormalAccountAction',
|
|
917
|
+
action: 'ignore',
|
|
918
|
+
transfers: [...action.transfers],
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
case 'income': {
|
|
922
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
923
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
924
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer));
|
|
925
|
+
if (transfers.length !== action.transfers.length) {
|
|
926
|
+
throw new Error('Invalid action.transfers for income');
|
|
927
|
+
}
|
|
928
|
+
return {
|
|
929
|
+
...action,
|
|
930
|
+
type: 'NormalAccountAction',
|
|
931
|
+
action: 'income',
|
|
932
|
+
transfers,
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
case 'mint-nft': {
|
|
936
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) ||
|
|
937
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer) ||
|
|
938
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
939
|
+
if (transfers.length !== action.transfers.length) {
|
|
940
|
+
throw new Error('Invalid action.transfers for mint-nft');
|
|
941
|
+
}
|
|
942
|
+
return {
|
|
943
|
+
...action,
|
|
944
|
+
type: 'NormalAccountAction',
|
|
945
|
+
action: 'mint-nft',
|
|
946
|
+
transfers,
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
case 'move': {
|
|
950
|
+
return {
|
|
951
|
+
...action,
|
|
952
|
+
type: 'NormalAccountAction',
|
|
953
|
+
action: 'move',
|
|
954
|
+
transfers: [...action.transfers],
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
case 'nft-royalty': {
|
|
958
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
959
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer));
|
|
960
|
+
if (transfers.length !== action.transfers.length) {
|
|
961
|
+
throw new Error('Invalid action.transfers for nft-royalty');
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
...action,
|
|
965
|
+
type: 'NormalAccountAction',
|
|
966
|
+
action: 'nft-royalty',
|
|
967
|
+
transfers,
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
case 'receive-from-cex': {
|
|
971
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
972
|
+
if (transfers.length !== action.transfers.length) {
|
|
973
|
+
throw new Error('Invalid action.transfers for receive-from-cex');
|
|
974
|
+
}
|
|
975
|
+
return {
|
|
976
|
+
...action,
|
|
977
|
+
type: 'NormalAccountAction',
|
|
978
|
+
action: 'receive-from-cex',
|
|
979
|
+
transfers,
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
case 'reduce': {
|
|
983
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
984
|
+
if (transfers.length !== action.transfers.length) {
|
|
985
|
+
throw new Error('Invalid action.transfers for reduce');
|
|
986
|
+
}
|
|
987
|
+
return {
|
|
988
|
+
...action,
|
|
989
|
+
type: 'NormalAccountAction',
|
|
990
|
+
action: 'reduce',
|
|
991
|
+
transfers,
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
case 'remove-liquidity': {
|
|
995
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
996
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
997
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
998
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
999
|
+
if (transfers.length !== action.transfers.length) {
|
|
1000
|
+
throw new Error('Invalid action.transfers for remove-liquidity');
|
|
1001
|
+
}
|
|
1002
|
+
if (action.loanId === undefined) {
|
|
1003
|
+
throw new Error('action.loandId is required for remove-liquidity');
|
|
1004
|
+
}
|
|
1005
|
+
return {
|
|
1006
|
+
...action,
|
|
1007
|
+
type: 'LoanAccountAction',
|
|
1008
|
+
action: 'remove-liquidity',
|
|
1009
|
+
loanId: action.loanId,
|
|
1010
|
+
transfers,
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
case 'repayment': {
|
|
1014
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
1015
|
+
if (transfers.length !== action.transfers.length) {
|
|
1016
|
+
throw new Error('Invalid action.transfers for repayment');
|
|
1017
|
+
}
|
|
1018
|
+
if (action.loanId === undefined) {
|
|
1019
|
+
throw new Error('action.loandId is required for repayment');
|
|
1020
|
+
}
|
|
1021
|
+
return {
|
|
1022
|
+
...action,
|
|
1023
|
+
type: 'LoanAccountAction',
|
|
1024
|
+
action: 'repayment',
|
|
1025
|
+
loanId: action.loanId,
|
|
1026
|
+
transfers,
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
case 'repayment-with-debt': {
|
|
1030
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1031
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1032
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1033
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
1034
|
+
if (transfers.length !== action.transfers.length) {
|
|
1035
|
+
throw new Error('Invalid action.transfers for repayment-with-debt');
|
|
1036
|
+
}
|
|
1037
|
+
if (action.loanId === undefined) {
|
|
1038
|
+
throw new Error('action.loandId is required for repayment-with-debt');
|
|
1039
|
+
}
|
|
1040
|
+
return {
|
|
1041
|
+
...action,
|
|
1042
|
+
type: 'LoanAccountAction',
|
|
1043
|
+
action: 'repayment-with-debt',
|
|
1044
|
+
loanId: action.loanId,
|
|
1045
|
+
transfers,
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
case 'replace': {
|
|
1049
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1050
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1051
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1052
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
1053
|
+
if (transfers.length !== action.transfers.length) {
|
|
1054
|
+
throw new Error('Invalid action.transfers for replace');
|
|
1055
|
+
}
|
|
1056
|
+
return {
|
|
1057
|
+
...action,
|
|
1058
|
+
type: 'NormalAccountAction',
|
|
1059
|
+
action: 'replace',
|
|
1060
|
+
transfers,
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
case 'revoke': {
|
|
1064
|
+
if (action.transfers.length > 0) {
|
|
1065
|
+
throw new Error('Invalid action.transfers for revoke');
|
|
1066
|
+
}
|
|
1067
|
+
return {
|
|
1068
|
+
...action,
|
|
1069
|
+
type: 'NormalAccountAction',
|
|
1070
|
+
action: 'revoke',
|
|
1071
|
+
transfers: [],
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
case 'sell-crypto': {
|
|
1075
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
1076
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
1077
|
+
if (transfers.length !== action.transfers.length) {
|
|
1078
|
+
throw new Error('Invalid action.transfers for sell-crypto');
|
|
1079
|
+
}
|
|
1080
|
+
return {
|
|
1081
|
+
...action,
|
|
1082
|
+
type: 'NormalAccountAction',
|
|
1083
|
+
action: 'sell-crypto',
|
|
1084
|
+
transfers,
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
case 'sell-nft': {
|
|
1088
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
1089
|
+
(0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1090
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
1091
|
+
if (transfers.length !== action.transfers.length) {
|
|
1092
|
+
throw new Error('Invalid action.transfers for sell-nft');
|
|
1093
|
+
}
|
|
1094
|
+
return {
|
|
1095
|
+
...action,
|
|
1096
|
+
type: 'NormalAccountAction',
|
|
1097
|
+
action: 'sell-nft',
|
|
1098
|
+
transfers,
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
case 'send-to-cex': {
|
|
1102
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
1103
|
+
if (transfers.length !== action.transfers.length) {
|
|
1104
|
+
throw new Error('Invalid action.transfers for send-to-cex');
|
|
1105
|
+
}
|
|
1106
|
+
return {
|
|
1107
|
+
...action,
|
|
1108
|
+
type: 'NormalAccountAction',
|
|
1109
|
+
action: 'send-to-cex',
|
|
1110
|
+
transfers,
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
case 'spam': {
|
|
1114
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1115
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1116
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1117
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
1118
|
+
if (transfers.length !== action.transfers.length) {
|
|
1119
|
+
throw new Error('Invalid action.transfers for spam');
|
|
1120
|
+
}
|
|
1121
|
+
return {
|
|
1122
|
+
...action,
|
|
1123
|
+
type: 'NormalAccountAction',
|
|
1124
|
+
action: 'spam',
|
|
1125
|
+
transfers,
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
case 'stake': {
|
|
1129
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
1130
|
+
if (transfers.length !== action.transfers.length) {
|
|
1131
|
+
throw new Error('Invalid action.transfers for stake');
|
|
1132
|
+
}
|
|
1133
|
+
if (action.loanId === undefined) {
|
|
1134
|
+
throw new Error('action.loandId is required for stake');
|
|
1135
|
+
}
|
|
1136
|
+
return {
|
|
1137
|
+
...action,
|
|
1138
|
+
type: 'LoanAccountAction',
|
|
1139
|
+
action: 'stake',
|
|
1140
|
+
loanId: action.loanId,
|
|
1141
|
+
transfers,
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
case 'swap-income': {
|
|
1145
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
1146
|
+
if (transfers.length !== action.transfers.length) {
|
|
1147
|
+
throw new Error('Invalid action.transfers for swap-income');
|
|
1148
|
+
}
|
|
1149
|
+
return {
|
|
1150
|
+
...action,
|
|
1151
|
+
type: 'NormalAccountAction',
|
|
1152
|
+
action: 'swap-income',
|
|
1153
|
+
transfers,
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
case 'swap-nft': {
|
|
1157
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferNftIn)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
1158
|
+
if (transfers.length !== action.transfers.length) {
|
|
1159
|
+
throw new Error('Invalid action.transfers for swap-nft');
|
|
1160
|
+
}
|
|
1161
|
+
return {
|
|
1162
|
+
...action,
|
|
1163
|
+
type: 'NormalAccountAction',
|
|
1164
|
+
action: 'swap-nft',
|
|
1165
|
+
transfers,
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1168
|
+
case 'swap-transfer': {
|
|
1169
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) || (0, exports.isTransferNftOut)(transfer));
|
|
1170
|
+
if (transfers.length !== action.transfers.length) {
|
|
1171
|
+
throw new Error('Invalid action.transfers for swap-transfer');
|
|
1172
|
+
}
|
|
1173
|
+
return {
|
|
1174
|
+
...action,
|
|
1175
|
+
type: 'NormalAccountAction',
|
|
1176
|
+
action: 'swap-transfer',
|
|
1177
|
+
transfers,
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
case 'trade': {
|
|
1181
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1182
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1183
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer) ||
|
|
1184
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1185
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
1186
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
1187
|
+
if (transfers.length !== action.transfers.length) {
|
|
1188
|
+
throw new Error('Invalid action.transfers for trade');
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
...action,
|
|
1192
|
+
type: 'NormalAccountAction',
|
|
1193
|
+
action: 'trade',
|
|
1194
|
+
transfers,
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
case 'transaction-fee': {
|
|
1198
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
1199
|
+
if (transfers.length !== action.transfers.length) {
|
|
1200
|
+
throw new Error('Invalid action.transfers for transaction-fee');
|
|
1201
|
+
}
|
|
1202
|
+
return {
|
|
1203
|
+
...action,
|
|
1204
|
+
type: 'NormalAccountAction',
|
|
1205
|
+
action: 'transaction-fee',
|
|
1206
|
+
transfers,
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
case 'transfer': {
|
|
1210
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1211
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
1212
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
1213
|
+
if (transfers.length !== action.transfers.length) {
|
|
1214
|
+
throw new Error('Invalid action.transfers for transfer');
|
|
1215
|
+
}
|
|
1216
|
+
return {
|
|
1217
|
+
...action,
|
|
1218
|
+
type: 'NormalAccountAction',
|
|
1219
|
+
action: 'transfer',
|
|
1220
|
+
transfers,
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
case 'unstake': {
|
|
1224
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
1225
|
+
if (transfers.length !== action.transfers.length) {
|
|
1226
|
+
throw new Error('Invalid action.transfers for unstake');
|
|
1227
|
+
}
|
|
1228
|
+
if (action.loanId === undefined) {
|
|
1229
|
+
throw new Error('action.loandId is required for unstake');
|
|
1230
|
+
}
|
|
1231
|
+
return {
|
|
1232
|
+
...action,
|
|
1233
|
+
type: 'LoanAccountAction',
|
|
1234
|
+
action: 'unstake',
|
|
1235
|
+
loanId: action.loanId,
|
|
1236
|
+
transfers,
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
case 'unwrap': {
|
|
1240
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1241
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
1242
|
+
if (transfers.length !== action.transfers.length) {
|
|
1243
|
+
throw new Error('Invalid action.transfers for unwrap');
|
|
1244
|
+
}
|
|
1245
|
+
return {
|
|
1246
|
+
...action,
|
|
1247
|
+
type: 'NormalAccountAction',
|
|
1248
|
+
action: 'unwrap',
|
|
1249
|
+
transfers,
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
case 'valuedown': {
|
|
1253
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1254
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1255
|
+
(0, exports.isTransferFiatCurrencyIn)(transfer));
|
|
1256
|
+
if (transfers.length !== action.transfers.length) {
|
|
1257
|
+
throw new Error('Invalid action.transfers for valuedown');
|
|
1258
|
+
}
|
|
1259
|
+
if (action.target === undefined) {
|
|
1260
|
+
throw new Error('action.target is required for valuedown');
|
|
1261
|
+
}
|
|
1262
|
+
return {
|
|
1263
|
+
...action,
|
|
1264
|
+
type: 'NormalAccountAction',
|
|
1265
|
+
action: 'valuedown',
|
|
1266
|
+
target: action.target,
|
|
1267
|
+
transfers,
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
case 'valueup': {
|
|
1271
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1272
|
+
(0, exports.isTransferNftOut)(transfer) ||
|
|
1273
|
+
(0, exports.isTransferFiatCurrencyOut)(transfer));
|
|
1274
|
+
if (transfers.length !== action.transfers.length) {
|
|
1275
|
+
throw new Error('Invalid action.transfers for valueup');
|
|
1276
|
+
}
|
|
1277
|
+
if (action.target === undefined) {
|
|
1278
|
+
throw new Error('action.target is required for valueup');
|
|
1279
|
+
}
|
|
1280
|
+
return {
|
|
1281
|
+
...action,
|
|
1282
|
+
type: 'NormalAccountAction',
|
|
1283
|
+
action: 'valueup',
|
|
1284
|
+
target: action.target,
|
|
1285
|
+
transfers,
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
case 'withdraw': {
|
|
1289
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) || (0, exports.isTransferNftIn)(transfer));
|
|
1290
|
+
if (transfers.length !== action.transfers.length) {
|
|
1291
|
+
throw new Error('Invalid action.transfers for withdraw');
|
|
1292
|
+
}
|
|
1293
|
+
if (action.loanId === undefined) {
|
|
1294
|
+
throw new Error('action.loandId is required for withdraw');
|
|
1295
|
+
}
|
|
1296
|
+
return {
|
|
1297
|
+
...action,
|
|
1298
|
+
type: 'LoanAccountAction',
|
|
1299
|
+
action: 'withdraw',
|
|
1300
|
+
loanId: action.loanId,
|
|
1301
|
+
transfers,
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
case 'withdraw-with-bond': {
|
|
1305
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1306
|
+
(0, exports.isTransferNftIn)(transfer) ||
|
|
1307
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer) ||
|
|
1308
|
+
(0, exports.isTransferNftOut)(transfer));
|
|
1309
|
+
if (transfers.length !== action.transfers.length) {
|
|
1310
|
+
throw new Error('Invalid action.transfers for withdraw-with-bond');
|
|
1311
|
+
}
|
|
1312
|
+
if (action.loanId === undefined) {
|
|
1313
|
+
throw new Error('action.loandId is required for withdraw-with-bond');
|
|
1314
|
+
}
|
|
1315
|
+
return {
|
|
1316
|
+
...action,
|
|
1317
|
+
type: 'LoanAccountAction',
|
|
1318
|
+
action: 'withdraw-with-bond',
|
|
1319
|
+
loanId: action.loanId,
|
|
1320
|
+
transfers,
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
case 'wrap': {
|
|
1324
|
+
const transfers = action.transfers.filter((transfer) => (0, exports.isTransferCryptoCurrencyIn)(transfer) ||
|
|
1325
|
+
(0, exports.isTransferCryptoCurrencyOut)(transfer));
|
|
1326
|
+
if (transfers.length !== action.transfers.length) {
|
|
1327
|
+
throw new Error('Invalid action.transfers for wrap');
|
|
1328
|
+
}
|
|
1329
|
+
return {
|
|
1330
|
+
...action,
|
|
1331
|
+
type: 'NormalAccountAction',
|
|
1332
|
+
action: 'wrap',
|
|
1333
|
+
transfers,
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
exports.parseBaseAccountActionToAccountAction = parseBaseAccountActionToAccountAction;
|
|
22
1339
|
//# sourceMappingURL=utils.js.map
|