@ultrade/shared 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/common/auth.helper.js +1 -1
- package/dist/browser/common/index.js +1 -1
- package/dist/browser/constants/index.js +1 -1
- package/dist/browser/helpers/Encoding.js +1 -1
- package/dist/browser/helpers/algo.helper.js +1 -1
- package/dist/browser/helpers/balance.helper.js +1 -1
- package/dist/browser/helpers/codex/common.helper.js +2 -2
- package/dist/browser/helpers/codex/index.js +2 -2
- package/dist/browser/helpers/codex/mbr.helper.js +1 -1
- package/dist/browser/helpers/codex/mna.helper.js +1 -1
- package/dist/browser/helpers/codex/order.helper.js +1 -1
- package/dist/browser/helpers/codex/setGlobal.helper.js +1 -1
- package/dist/browser/helpers/codex/transfer.helper.js +2 -2
- package/dist/browser/helpers/codex/txn.helper.js +1 -1
- package/dist/browser/helpers/codex.helper.js +6 -6
- package/dist/browser/helpers/eth.helper.js +2 -2
- package/dist/browser/helpers/index.js +1 -1
- package/dist/browser/helpers/pointSystem.helper.js +1 -1
- package/dist/browser/helpers/withdraw.helper.js +2 -2
- package/dist/browser/interfaces/index.js +1 -1
- package/dist/browser/types/index.js +1 -1
- package/dist/node/common/index.js +1 -1
- package/dist/node/helpers/Encoding.js +1 -1
- package/dist/node/helpers/algo.helper.js +1 -1
- package/dist/node/helpers/assert.helper.js +1 -1
- package/dist/node/helpers/balance.helper.js +1 -1
- package/dist/node/helpers/codex/common.helper.js +2 -2
- package/dist/node/helpers/codex/index.js +2 -2
- package/dist/node/helpers/codex/mbr.helper.js +1 -1
- package/dist/node/helpers/codex/mna.helper.js +1 -1
- package/dist/node/helpers/codex/order.helper.js +1 -1
- package/dist/node/helpers/codex/setGlobal.helper.js +1 -1
- package/dist/node/helpers/codex/transfer.helper.js +2 -2
- package/dist/node/helpers/codex/txn.helper.js +1 -1
- package/dist/node/helpers/codex.helper.js +5 -5
- package/dist/node/helpers/eth.helper.js +2 -2
- package/dist/node/helpers/pointSystem.helper.js +1 -1
- package/dist/node/helpers/withdraw.helper.js +1 -1
- package/dist/node/types/index.js +1 -1
- package/dist/src/helpers/Encoding.d.ts +1 -0
- package/dist/src/interfaces/order.interface.d.ts +9 -1
- package/dist/src/interfaces/services/balances.interface.d.ts +1 -1
- package/dist/src/types/balance-result.types.d.ts +86 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/settings.type.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ICodexBalance } from '../interfaces/index.ts';
|
|
2
|
+
export type ErrorResult = {
|
|
3
|
+
status: 'error';
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export type BalanceOperationResult = {
|
|
7
|
+
status: 'ok';
|
|
8
|
+
total: string;
|
|
9
|
+
locked: string;
|
|
10
|
+
} | {
|
|
11
|
+
status: 'not_found';
|
|
12
|
+
} | {
|
|
13
|
+
status: 'insufficient';
|
|
14
|
+
} | ErrorResult;
|
|
15
|
+
export type BalanceWithEntityResult = {
|
|
16
|
+
status: 'ok';
|
|
17
|
+
balance: ICodexBalance;
|
|
18
|
+
} | {
|
|
19
|
+
status: 'not_found';
|
|
20
|
+
} | {
|
|
21
|
+
status: 'insufficient';
|
|
22
|
+
};
|
|
23
|
+
export type DetailedBalanceOperationResult = {
|
|
24
|
+
status: 'ok';
|
|
25
|
+
total: string;
|
|
26
|
+
locked: string;
|
|
27
|
+
} | {
|
|
28
|
+
status: 'not_found';
|
|
29
|
+
} | {
|
|
30
|
+
status: 'insufficient_available';
|
|
31
|
+
} | {
|
|
32
|
+
status: 'insufficient_locked';
|
|
33
|
+
} | {
|
|
34
|
+
status: 'insufficient_total';
|
|
35
|
+
} | {
|
|
36
|
+
status: 'insufficient';
|
|
37
|
+
} | {
|
|
38
|
+
status: 'error';
|
|
39
|
+
message: string;
|
|
40
|
+
};
|
|
41
|
+
export type ResyncBalanceResult = {
|
|
42
|
+
status: 'ok';
|
|
43
|
+
total: string;
|
|
44
|
+
locked: string;
|
|
45
|
+
oldTotal: string;
|
|
46
|
+
} | {
|
|
47
|
+
status: 'error';
|
|
48
|
+
};
|
|
49
|
+
export type UpdateBalanceResult = {
|
|
50
|
+
status: 'ok';
|
|
51
|
+
total: string;
|
|
52
|
+
locked: string;
|
|
53
|
+
previousTotal: string;
|
|
54
|
+
} | {
|
|
55
|
+
status: 'not_found';
|
|
56
|
+
};
|
|
57
|
+
export type BalanceQueryResult = {
|
|
58
|
+
total: string;
|
|
59
|
+
locked: string;
|
|
60
|
+
} | null;
|
|
61
|
+
export type InitBalanceResult = {
|
|
62
|
+
status: 'ok';
|
|
63
|
+
} | {
|
|
64
|
+
status: 'error';
|
|
65
|
+
message?: string;
|
|
66
|
+
};
|
|
67
|
+
export type IncreaseBalanceResult = {
|
|
68
|
+
status: 'ok';
|
|
69
|
+
total: string;
|
|
70
|
+
locked: string;
|
|
71
|
+
} | ErrorResult;
|
|
72
|
+
export type DecreaseBalanceResult = {
|
|
73
|
+
status: 'ok';
|
|
74
|
+
total: string;
|
|
75
|
+
locked: string;
|
|
76
|
+
previousTotal: string;
|
|
77
|
+
previousLocked: string;
|
|
78
|
+
} | {
|
|
79
|
+
status: 'not_found';
|
|
80
|
+
} | {
|
|
81
|
+
status: 'insufficient_locked';
|
|
82
|
+
} | {
|
|
83
|
+
status: 'insufficient_total';
|
|
84
|
+
} | {
|
|
85
|
+
status: 'insufficient_available';
|
|
86
|
+
} | ErrorResult;
|
|
@@ -24,6 +24,7 @@ export declare enum SettingIds {
|
|
|
24
24
|
APPEARANCE_CHART_INT = "appearance.chartInt",
|
|
25
25
|
PINNED_PAIRS = "markets.pinnedPairs",
|
|
26
26
|
KYC_TRADE_REQUIREMENT_ENABLED = "markets.kycTradeRequirementEnabled",
|
|
27
|
+
FORCE_SETTING_FLAG = "company.forceSetting",
|
|
27
28
|
AFFILIATE_DASHBOARD_VISIBILITY = "product.affiliateDashboardVisibility",
|
|
28
29
|
AFFILIATE_DASHBOARD_THRESHOLD = "product.affiliateDashboardThreshold",
|
|
29
30
|
AFFILIATE_DEFAULT_FEE_SHARE = "product.affiliateDefaultFeeShare",
|