@reown/appkit-common-react-native 0.0.0-fix-email-login-20241010173711 → 0.0.0-fix-token-balance-20241017200828
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/lib/commonjs/contracts/erc20.js +77 -0
- package/lib/commonjs/contracts/erc20.js.map +1 -0
- package/lib/commonjs/contracts/usdt.js +38 -0
- package/lib/commonjs/contracts/usdt.js.map +1 -0
- package/lib/commonjs/index.js +56 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js +18 -1
- package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
- package/lib/commonjs/utils/ContractUtil.js +18 -0
- package/lib/commonjs/utils/ContractUtil.js.map +1 -0
- package/lib/commonjs/utils/DateUtil.js +48 -0
- package/lib/commonjs/utils/DateUtil.js.map +1 -0
- package/lib/commonjs/utils/NamesUtil.js +13 -0
- package/lib/commonjs/utils/NamesUtil.js.map +1 -0
- package/lib/commonjs/utils/NumberUtil.js +33 -0
- package/lib/commonjs/utils/NumberUtil.js.map +1 -0
- package/lib/commonjs/utils/TypeUtil.js +2 -0
- package/lib/commonjs/utils/TypeUtil.js.map +1 -0
- package/lib/module/contracts/erc20.js +71 -0
- package/lib/module/contracts/erc20.js.map +1 -0
- package/lib/module/contracts/usdt.js +32 -0
- package/lib/module/contracts/usdt.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/ConstantsUtil.js +18 -1
- package/lib/module/utils/ConstantsUtil.js.map +1 -1
- package/lib/module/utils/ContractUtil.js +12 -0
- package/lib/module/utils/ContractUtil.js.map +1 -0
- package/lib/module/utils/DateUtil.js +41 -0
- package/lib/module/utils/DateUtil.js.map +1 -0
- package/lib/module/utils/NamesUtil.js +7 -0
- package/lib/module/utils/NamesUtil.js.map +1 -0
- package/lib/module/utils/NumberUtil.js +25 -0
- package/lib/module/utils/NumberUtil.js.map +1 -0
- package/lib/module/utils/TypeUtil.js +2 -0
- package/lib/module/utils/TypeUtil.js.map +1 -0
- package/lib/typescript/contracts/erc20.d.ts +30 -0
- package/lib/typescript/contracts/erc20.d.ts.map +1 -0
- package/lib/typescript/contracts/usdt.d.ts +14 -0
- package/lib/typescript/contracts/usdt.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +6 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/ConstantsUtil.d.ts +3 -0
- package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
- package/lib/typescript/utils/ContractUtil.d.ts +16 -0
- package/lib/typescript/utils/ContractUtil.d.ts.map +1 -0
- package/lib/typescript/utils/DateUtil.d.ts +7 -0
- package/lib/typescript/utils/DateUtil.d.ts.map +1 -0
- package/lib/typescript/utils/NamesUtil.d.ts +4 -0
- package/lib/typescript/utils/NamesUtil.d.ts.map +1 -0
- package/lib/typescript/utils/NumberUtil.d.ts +13 -0
- package/lib/typescript/utils/NumberUtil.d.ts.map +1 -0
- package/lib/typescript/utils/TypeUtil.d.ts +78 -0
- package/lib/typescript/utils/TypeUtil.d.ts.map +1 -0
- package/package.json +8 -4
- package/readme.md +1 -1
- package/src/contracts/erc20.ts +95 -0
- package/src/contracts/usdt.ts +43 -0
- package/src/index.ts +6 -0
- package/src/utils/ConstantsUtil.ts +19 -1
- package/src/utils/ContractUtil.ts +13 -0
- package/src/utils/DateUtil.ts +47 -0
- package/src/utils/NamesUtil.ts +10 -0
- package/src/utils/NumberUtil.ts +31 -0
- package/src/utils/TypeUtil.ts +87 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export interface Balance {
|
|
2
|
+
name: string;
|
|
3
|
+
symbol: string;
|
|
4
|
+
chainId: string;
|
|
5
|
+
address?: string;
|
|
6
|
+
value?: number;
|
|
7
|
+
price: number;
|
|
8
|
+
quantity: BalanceQuantity;
|
|
9
|
+
iconUrl: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type BalanceQuantity = {
|
|
13
|
+
decimals: string;
|
|
14
|
+
numeric: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type TransactionStatus = 'confirmed' | 'failed' | 'pending';
|
|
18
|
+
export type TransactionDirection = 'in' | 'out' | 'self';
|
|
19
|
+
export type TransactionImage = {
|
|
20
|
+
type: 'FUNGIBLE' | 'NFT' | undefined;
|
|
21
|
+
url: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export interface Transaction {
|
|
25
|
+
id: string;
|
|
26
|
+
metadata: TransactionMetadata;
|
|
27
|
+
transfers: TransactionTransfer[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface TransactionMetadata {
|
|
31
|
+
application: {
|
|
32
|
+
iconUrl: string | null;
|
|
33
|
+
name: string | null;
|
|
34
|
+
};
|
|
35
|
+
operationType: string;
|
|
36
|
+
hash: string;
|
|
37
|
+
minedAt: string;
|
|
38
|
+
sentFrom: string;
|
|
39
|
+
sentTo: string;
|
|
40
|
+
status: TransactionStatus;
|
|
41
|
+
nonce: number;
|
|
42
|
+
chain?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface TransactionTransfer {
|
|
46
|
+
fungible_info?: {
|
|
47
|
+
name?: string;
|
|
48
|
+
symbol?: string;
|
|
49
|
+
icon?: {
|
|
50
|
+
url: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
nft_info?: TransactionNftInfo;
|
|
54
|
+
direction: TransactionDirection;
|
|
55
|
+
quantity: TransactionQuantity;
|
|
56
|
+
value?: number;
|
|
57
|
+
price?: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface TransactionNftInfo {
|
|
61
|
+
name?: string;
|
|
62
|
+
content?: TransactionContent;
|
|
63
|
+
flags: TransactionNftInfoFlags;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface TransactionNftInfoFlags {
|
|
67
|
+
is_spam: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface TransactionContent {
|
|
71
|
+
preview?: TransactionPreview;
|
|
72
|
+
detail?: TransactionDetail;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface TransactionPreview {
|
|
76
|
+
url: string;
|
|
77
|
+
content_type?: null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface TransactionDetail {
|
|
81
|
+
url: string;
|
|
82
|
+
content_type?: null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface TransactionQuantity {
|
|
86
|
+
numeric: string;
|
|
87
|
+
}
|