@instadapp/avocado-base 0.1.8 → 0.2.0

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/utils/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Chain } from "viem";
1
+ import type { Chain } from 'viem'
2
2
 
3
3
  declare global {
4
4
  type ChainId =
@@ -23,125 +23,125 @@ declare global {
23
23
  | 81457
24
24
  | 59144
25
25
 
26
- type ISlackMessageType = "danger" | "error" | "success" | "banner";
26
+ type ISlackMessageType = 'danger' | 'error' | 'success' | 'banner'
27
27
 
28
- type MetadataTypes = keyof typeof MetadataEnums;
28
+ type MetadataTypes = keyof typeof MetadataEnums
29
29
 
30
- type PayloadFunction = (data: any, type: MetadataTypes) => any;
30
+ type PayloadFunction = (data: any, type: MetadataTypes) => any
31
31
 
32
- type IPayload = Record<MetadataTypes, PayloadFunction>;
32
+ type IPayload = Record<MetadataTypes, PayloadFunction>
33
33
 
34
34
  interface Network {
35
- name: string;
36
- debankName?: string;
37
- ankrName?: string;
38
- zerionName?: string;
39
- chainId: ChainId;
40
- color: string;
41
- isAvocado?: boolean;
42
- serverRpcUrl: string | undefined;
43
- balanceResolverAddress?: string;
44
- usdcAddress?: string;
45
- explorerUrl: string;
46
- fakeTransactionHash: string;
47
- viemChain: Chain;
35
+ name: string
36
+ debankName?: string
37
+ ankrName?: string
38
+ zerionName?: string
39
+ chainId: ChainId
40
+ color: string
41
+ isAvocado?: boolean
42
+ serverRpcUrl: string | undefined
43
+ balanceResolverAddress?: string
44
+ usdcAddress?: string
45
+ explorerUrl: string
46
+ fakeTransactionHash: string
47
+ viemChain: Chain
48
+ legacySupported: boolean
48
49
  // must start with https://
49
- apiURL: `https://${string}` | null;
50
+ apiURL: `https://${string}` | null
50
51
  params: {
51
- chainName?: string;
52
- iconUrls?: string[];
53
- rpcUrls: string[];
52
+ chainName?: string
53
+ iconUrls?: string[]
54
+ rpcUrls: string[]
54
55
  nativeCurrency?: {
55
- name: string;
56
- symbol: string;
57
- decimals: number;
58
- };
59
- };
56
+ name: string
57
+ symbol: string
58
+ decimals: number
59
+ }
60
+ }
60
61
  }
61
62
 
62
- type SignMetadataProps = {
63
- token: string;
64
- spender: string;
65
- amount: string;
66
- expiration: string;
67
- };
68
-
69
- type DappMetadataProps = {
70
- name: string;
71
- url: string;
72
- };
73
-
74
- type SendMetadataProps = {
75
- token: string;
76
- amount: string;
77
- receiver: string;
78
- };
79
-
80
- type CrossSendMetadataProps = {
81
- fromToken: string;
82
- toToken: string;
83
- toChainId: string;
84
- amount: string;
85
- receiver: string;
86
- provider?: string;
87
- };
88
-
89
-
90
- type AuthMetadataProps = {
91
- address: string;
92
- chainId: string;
93
- remove: boolean;
94
- };
95
-
96
- type UpgradeMetadataProps = {
97
- version: string;
98
- walletImpl: string;
99
- };
100
-
101
- type TopupMetadataProps = {
102
- amount: string;
103
- token: string;
104
- onBehalf: string;
105
- };
106
-
107
- type BridgeMetadataProps = {
108
- amount: string;
109
- receiver: string;
110
- fromToken: string;
111
- toToken: string;
112
- toChainId: string;
113
- bridgeFee: string;
114
- nativeToken: string;
115
- version?: string;
116
- provider: string;
117
- };
118
-
119
- type SwapMetadataProps = {
120
- sellToken: string;
121
- buyToken: string;
122
- sellAmount: string;
123
- buyAmount: string;
124
- receiver: string;
125
- protocol?: string;
126
- };
127
-
128
- type MetadataProps = {
129
- type: MetadataTypes;
130
- encodedData: string;
131
- version?: string;
132
- };
63
+ interface SignMetadataProps {
64
+ token: string
65
+ spender: string
66
+ amount: string
67
+ expiration: string
68
+ }
69
+
70
+ interface DappMetadataProps {
71
+ name: string
72
+ url: string
73
+ }
74
+
75
+ interface SendMetadataProps {
76
+ token: string
77
+ amount: string
78
+ receiver: string
79
+ }
80
+
81
+ interface CrossSendMetadataProps {
82
+ fromToken: string
83
+ toToken: string
84
+ toChainId: string
85
+ amount: string
86
+ receiver: string
87
+ provider?: string
88
+ }
89
+
90
+ interface AuthMetadataProps {
91
+ address: string
92
+ chainId: string
93
+ remove: boolean
94
+ }
95
+
96
+ interface UpgradeMetadataProps {
97
+ version: string
98
+ walletImpl: string
99
+ }
100
+
101
+ interface TopupMetadataProps {
102
+ amount: string
103
+ token: string
104
+ onBehalf: string
105
+ }
106
+
107
+ interface BridgeMetadataProps {
108
+ amount: string
109
+ receiver: string
110
+ fromToken: string
111
+ toToken: string
112
+ toChainId: string
113
+ bridgeFee: string
114
+ nativeToken: string
115
+ version?: string
116
+ provider: string
117
+ }
118
+
119
+ interface SwapMetadataProps {
120
+ sellToken: string
121
+ buyToken: string
122
+ sellAmount: string
123
+ buyAmount: string
124
+ receiver: string
125
+ protocol?: string
126
+ }
127
+
128
+ interface MetadataProps {
129
+ type: MetadataTypes
130
+ encodedData: string
131
+ version?: string
132
+ }
133
133
 
134
134
  interface ITokenPrice {
135
- address: string;
136
- chain_id: string;
137
- name: string;
138
- symbol: string;
139
- decimals: number;
140
- logo_url: string;
141
- price: string;
142
- coingecko_id: string;
143
- sparkline_price_7d: number[];
135
+ address: string
136
+ chain_id: string
137
+ name: string
138
+ symbol: string
139
+ decimals: number
140
+ logo_url: string
141
+ price: string
142
+ coingecko_id: string
143
+ sparkline_price_7d: number[]
144
144
  }
145
145
  }
146
146
 
147
- export {};
147
+ export {}