@0xtorch/core 0.0.17 → 0.0.18
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 -6
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/parsers/action.js +0 -8
- package/_cjs/actions/parsers/action.js.map +1 -1
- package/_cjs/actions/parsers/borrow/index.js +1 -3
- package/_cjs/actions/parsers/borrow/index.js.map +1 -1
- package/_cjs/actions/parsers/index.js +1 -2
- package/_cjs/actions/parsers/index.js.map +1 -1
- package/_cjs/actions/schemas/action.js +0 -3
- package/_cjs/actions/schemas/action.js.map +1 -1
- package/_cjs/actions/schemas/borrow/index.js +1 -4
- package/_cjs/actions/schemas/borrow/index.js.map +1 -1
- package/_cjs/actions/schemas/default/unions.js +0 -2
- package/_cjs/actions/schemas/default/unions.js.map +1 -1
- package/_cjs/actions/schemas/index.js +3 -5
- package/_cjs/actions/schemas/index.js.map +1 -1
- package/_cjs/actions/utils.js +0 -38
- package/_cjs/actions/utils.js.map +1 -1
- package/_cjs/index.js +3 -5
- package/_cjs/index.js.map +1 -1
- package/_esm/actions/index.js +2 -2
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/parsers/action.js +1 -9
- package/_esm/actions/parsers/action.js.map +1 -1
- package/_esm/actions/parsers/borrow/index.js +0 -1
- package/_esm/actions/parsers/borrow/index.js.map +1 -1
- package/_esm/actions/parsers/index.js +1 -1
- package/_esm/actions/parsers/index.js.map +1 -1
- package/_esm/actions/schemas/action.js +1 -4
- package/_esm/actions/schemas/action.js.map +1 -1
- package/_esm/actions/schemas/borrow/index.js +0 -1
- package/_esm/actions/schemas/borrow/index.js.map +1 -1
- package/_esm/actions/schemas/default/unions.js +0 -2
- package/_esm/actions/schemas/default/unions.js.map +1 -1
- package/_esm/actions/schemas/index.js +1 -1
- package/_esm/actions/schemas/index.js.map +1 -1
- package/_esm/actions/utils.js +0 -42
- 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 +3 -3
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/parsers/action.d.ts.map +1 -1
- package/_types/actions/parsers/borrow/index.d.ts +0 -1
- package/_types/actions/parsers/borrow/index.d.ts.map +1 -1
- package/_types/actions/parsers/index.d.ts +1 -1
- package/_types/actions/parsers/index.d.ts.map +1 -1
- package/_types/actions/schemas/action.d.ts +8818 -11544
- package/_types/actions/schemas/action.d.ts.map +1 -1
- package/_types/actions/schemas/borrow/index.d.ts +0 -1
- package/_types/actions/schemas/borrow/index.d.ts.map +1 -1
- package/_types/actions/schemas/default/accountAction.d.ts +9 -9
- package/_types/actions/schemas/default/normalAction.d.ts +9 -9
- package/_types/actions/schemas/default/unions.d.ts +2 -2
- package/_types/actions/schemas/default/unions.d.ts.map +1 -1
- package/_types/actions/schemas/index.d.ts +1 -1
- package/_types/actions/schemas/index.d.ts.map +1 -1
- package/_types/actions/types/index.d.ts +0 -1
- package/_types/actions/types/index.d.ts.map +1 -1
- package/_types/actions/utils.d.ts.map +1 -1
- package/_types/index.d.ts +2 -2
- package/_types/index.d.ts.map +1 -1
- package/actions/index.ts +0 -5
- package/actions/parsers/action.ts +1 -12
- package/actions/parsers/borrow/index.ts +0 -1
- package/actions/parsers/index.ts +1 -4
- package/actions/schemas/action.ts +1 -9
- package/actions/schemas/borrow/index.ts +0 -4
- package/actions/schemas/default/unions.ts +0 -2
- package/actions/schemas/index.ts +1 -6
- package/actions/types/index.ts +0 -4
- package/actions/utils.ts +0 -62
- package/index.ts +0 -4
- package/package.json +1 -1
- package/_cjs/actions/parsers/borrow/borrowWithDebt.js +0 -23
- package/_cjs/actions/parsers/borrow/borrowWithDebt.js.map +0 -1
- package/_cjs/actions/schemas/borrow/borrowWithDebt.js +0 -36
- package/_cjs/actions/schemas/borrow/borrowWithDebt.js.map +0 -1
- package/_cjs/actions/types/borrowWithDebt.js +0 -3
- package/_cjs/actions/types/borrowWithDebt.js.map +0 -1
- package/_esm/actions/parsers/borrow/borrowWithDebt.js +0 -19
- package/_esm/actions/parsers/borrow/borrowWithDebt.js.map +0 -1
- package/_esm/actions/schemas/borrow/borrowWithDebt.js +0 -33
- package/_esm/actions/schemas/borrow/borrowWithDebt.js.map +0 -1
- package/_esm/actions/types/borrowWithDebt.js +0 -2
- package/_esm/actions/types/borrowWithDebt.js.map +0 -1
- package/_types/actions/parsers/borrow/borrowWithDebt.d.ts +0 -4
- package/_types/actions/parsers/borrow/borrowWithDebt.d.ts.map +0 -1
- package/_types/actions/schemas/borrow/borrowWithDebt.d.ts +0 -2730
- package/_types/actions/schemas/borrow/borrowWithDebt.d.ts.map +0 -1
- package/_types/actions/types/borrowWithDebt.d.ts +0 -5
- package/_types/actions/types/borrowWithDebt.d.ts.map +0 -1
- package/actions/parsers/borrow/borrowWithDebt.ts +0 -47
- package/actions/schemas/borrow/borrowWithDebt.ts +0 -45
- package/actions/types/borrowWithDebt.ts +0 -13
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"borrowWithDebt.d.ts","sourceRoot":"","sources":["../../../../actions/schemas/borrow/borrowWithDebt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBzC,CAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
import type { accountActionBorrowWithDebtSchema, normalActionBorrowWithDebtSchema } from '../schemas';
|
|
3
|
-
export type NormalActionBorrowWithDebt = z.infer<typeof normalActionBorrowWithDebtSchema>;
|
|
4
|
-
export type AccountActionBorrowWithDebt = z.infer<typeof accountActionBorrowWithDebtSchema>;
|
|
5
|
-
//# sourceMappingURL=borrowWithDebt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"borrowWithDebt.d.ts","sourceRoot":"","sources":["../../../actions/types/borrowWithDebt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAC5B,OAAO,KAAK,EACV,iCAAiC,EACjC,gCAAgC,EACjC,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AccountActionBorrowWithDebt,
|
|
3
|
-
AccountActionIncome,
|
|
4
|
-
AccountActionMove,
|
|
5
|
-
AccountActionReceiveFromCex,
|
|
6
|
-
AccountActionSendToCex,
|
|
7
|
-
AccountActionTransfer,
|
|
8
|
-
NormalActionBorrowWithDebt,
|
|
9
|
-
} from '../../types'
|
|
10
|
-
import {
|
|
11
|
-
allTransfersIsAccountRelated,
|
|
12
|
-
createAccountActionCommon,
|
|
13
|
-
parseNormalActionToAccountActions,
|
|
14
|
-
} from '../default'
|
|
15
|
-
import type { ParseNormalActionToAccountActionsParameters } from '../types'
|
|
16
|
-
|
|
17
|
-
export const parseNormalActionBorrowWithDebtToAccountActions = ({
|
|
18
|
-
action,
|
|
19
|
-
accountIds,
|
|
20
|
-
source,
|
|
21
|
-
cexAccountIds,
|
|
22
|
-
}: ParseNormalActionToAccountActionsParameters<NormalActionBorrowWithDebt>):
|
|
23
|
-
| [AccountActionBorrowWithDebt]
|
|
24
|
-
| readonly (
|
|
25
|
-
| AccountActionIncome
|
|
26
|
-
| AccountActionTransfer
|
|
27
|
-
| AccountActionMove
|
|
28
|
-
| AccountActionReceiveFromCex
|
|
29
|
-
| AccountActionSendToCex
|
|
30
|
-
)[] =>
|
|
31
|
-
allTransfersIsAccountRelated(action.transfers, accountIds)
|
|
32
|
-
? [
|
|
33
|
-
{
|
|
34
|
-
...createAccountActionCommon(action, source),
|
|
35
|
-
type: 'LoanAccountAction',
|
|
36
|
-
action: 'borrow-with-debt',
|
|
37
|
-
evidence: action.evidence,
|
|
38
|
-
loanId: action.loanId,
|
|
39
|
-
transfers: action.transfers,
|
|
40
|
-
},
|
|
41
|
-
]
|
|
42
|
-
: parseNormalActionToAccountActions({
|
|
43
|
-
action,
|
|
44
|
-
accountIds,
|
|
45
|
-
source,
|
|
46
|
-
cexAccountIds,
|
|
47
|
-
})
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
import {
|
|
3
|
-
loanAccountActionDefaultSchema,
|
|
4
|
-
loanNormalActionDefaultSchema,
|
|
5
|
-
transferCryptoCurrencyInSchema,
|
|
6
|
-
transferCryptoCurrencyOutSchema,
|
|
7
|
-
transferNftInSchema,
|
|
8
|
-
transferNftOutSchema,
|
|
9
|
-
} from '../default'
|
|
10
|
-
|
|
11
|
-
export const normalActionBorrowWithDebtSchema = loanNormalActionDefaultSchema
|
|
12
|
-
.extend({
|
|
13
|
-
action: z.literal('borrow-with-debt'),
|
|
14
|
-
transfers: z.array(
|
|
15
|
-
z.union([
|
|
16
|
-
transferCryptoCurrencyInSchema,
|
|
17
|
-
transferNftInSchema,
|
|
18
|
-
transferCryptoCurrencyOutSchema,
|
|
19
|
-
transferNftOutSchema,
|
|
20
|
-
]),
|
|
21
|
-
),
|
|
22
|
-
})
|
|
23
|
-
.transform((v) => ({
|
|
24
|
-
...v,
|
|
25
|
-
comment: v.comment,
|
|
26
|
-
app: v.app,
|
|
27
|
-
}))
|
|
28
|
-
|
|
29
|
-
export const accountActionBorrowWithDebtSchema = loanAccountActionDefaultSchema
|
|
30
|
-
.extend({
|
|
31
|
-
action: z.literal('borrow-with-debt'),
|
|
32
|
-
transfers: z.array(
|
|
33
|
-
z.union([
|
|
34
|
-
transferCryptoCurrencyInSchema,
|
|
35
|
-
transferNftInSchema,
|
|
36
|
-
transferCryptoCurrencyOutSchema,
|
|
37
|
-
transferNftOutSchema,
|
|
38
|
-
]),
|
|
39
|
-
),
|
|
40
|
-
})
|
|
41
|
-
.transform((v) => ({
|
|
42
|
-
...v,
|
|
43
|
-
comment: v.comment,
|
|
44
|
-
app: v.app,
|
|
45
|
-
}))
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod'
|
|
2
|
-
import type {
|
|
3
|
-
accountActionBorrowWithDebtSchema,
|
|
4
|
-
normalActionBorrowWithDebtSchema,
|
|
5
|
-
} from '../schemas'
|
|
6
|
-
|
|
7
|
-
export type NormalActionBorrowWithDebt = z.infer<
|
|
8
|
-
typeof normalActionBorrowWithDebtSchema
|
|
9
|
-
>
|
|
10
|
-
|
|
11
|
-
export type AccountActionBorrowWithDebt = z.infer<
|
|
12
|
-
typeof accountActionBorrowWithDebtSchema
|
|
13
|
-
>
|