@usdu-finance/usdu-core 0.0.1 → 0.0.2

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/index.js CHANGED
@@ -22,6 +22,8 @@ var exports_exports = {};
22
22
  __export(exports_exports, {
23
23
  ADDRESS: () => ADDRESS,
24
24
  AggregatorV3Interface_ABI: () => AggregatorV3Interface_ABI,
25
+ ChainMain: () => ChainMain,
26
+ ChainSide: () => ChainSide,
25
27
  CurveAdapterV1_1_ABI: () => CurveAdapterV1_1_ABI,
26
28
  CurveAdapterV1_2_ABI: () => CurveAdapterV1_2_ABI,
27
29
  CurveAdapterV1_ABI: () => CurveAdapterV1_ABI,
@@ -60,6 +62,9 @@ __export(exports_exports, {
60
62
  MorphoChainlinkOracleV2_ABI: () => MorphoChainlinkOracleV2_ABI,
61
63
  RewardDistributionV1_ABI: () => RewardDistributionV1_ABI,
62
64
  Stablecoin_ABI: () => Stablecoin_ABI,
65
+ SupportedChainIds: () => SupportedChainIds,
66
+ SupportedChains: () => SupportedChains,
67
+ SupportedChainsMap: () => SupportedChainsMap,
63
68
  VaultAdapterRecoverV1_ABI: () => VaultAdapterRecoverV1_ABI,
64
69
  VaultAdapterV1_ABI: () => VaultAdapterV1_ABI,
65
70
  getAddressFromChildIndex: () => getAddressFromChildIndex,
@@ -206,6 +211,31 @@ var ADDRESS = {
206
211
  }
207
212
  };
208
213
 
214
+ // exports/address.types.ts
215
+ var import_chains2 = require("viem/chains");
216
+ var ChainMain = { mainnet: import_chains2.mainnet };
217
+ var ChainSide = {
218
+ polygon: import_chains2.polygon,
219
+ arbitrum: import_chains2.arbitrum,
220
+ optimism: import_chains2.optimism,
221
+ base: import_chains2.base,
222
+ avalanche: import_chains2.avalanche,
223
+ gnosis: import_chains2.gnosis,
224
+ sonic: import_chains2.sonic
225
+ };
226
+ var SupportedChains = { ...ChainMain, ...ChainSide };
227
+ var SupportedChainsMap = {
228
+ [import_chains2.mainnet.id]: import_chains2.mainnet,
229
+ [import_chains2.polygon.id]: import_chains2.polygon,
230
+ [import_chains2.arbitrum.id]: import_chains2.arbitrum,
231
+ [import_chains2.optimism.id]: import_chains2.optimism,
232
+ [import_chains2.base.id]: import_chains2.base,
233
+ [import_chains2.avalanche.id]: import_chains2.avalanche,
234
+ [import_chains2.gnosis.id]: import_chains2.gnosis,
235
+ [import_chains2.sonic.id]: import_chains2.sonic
236
+ };
237
+ var SupportedChainIds = Object.values(SupportedChains).map((chain) => chain.id);
238
+
209
239
  // exports/abis/curve/CurveAdapterV1.ts
210
240
  var CurveAdapterV1_ABI = [
211
241
  {
@@ -21086,6 +21116,8 @@ var VaultAdapterV1_ABI = [
21086
21116
  0 && (module.exports = {
21087
21117
  ADDRESS,
21088
21118
  AggregatorV3Interface_ABI,
21119
+ ChainMain,
21120
+ ChainSide,
21089
21121
  CurveAdapterV1_1_ABI,
21090
21122
  CurveAdapterV1_2_ABI,
21091
21123
  CurveAdapterV1_ABI,
@@ -21124,6 +21156,9 @@ var VaultAdapterV1_ABI = [
21124
21156
  MorphoChainlinkOracleV2_ABI,
21125
21157
  RewardDistributionV1_ABI,
21126
21158
  Stablecoin_ABI,
21159
+ SupportedChainIds,
21160
+ SupportedChains,
21161
+ SupportedChainsMap,
21127
21162
  VaultAdapterRecoverV1_ABI,
21128
21163
  VaultAdapterV1_ABI,
21129
21164
  getAddressFromChildIndex,
package/dist/index.mjs CHANGED
@@ -134,6 +134,31 @@ var ADDRESS = {
134
134
  }
135
135
  };
136
136
 
137
+ // exports/address.types.ts
138
+ import { arbitrum as arbitrum2, avalanche as avalanche2, base as base2, gnosis as gnosis2, mainnet as mainnet2, optimism as optimism2, polygon as polygon2, sonic as sonic2 } from "viem/chains";
139
+ var ChainMain = { mainnet: mainnet2 };
140
+ var ChainSide = {
141
+ polygon: polygon2,
142
+ arbitrum: arbitrum2,
143
+ optimism: optimism2,
144
+ base: base2,
145
+ avalanche: avalanche2,
146
+ gnosis: gnosis2,
147
+ sonic: sonic2
148
+ };
149
+ var SupportedChains = { ...ChainMain, ...ChainSide };
150
+ var SupportedChainsMap = {
151
+ [mainnet2.id]: mainnet2,
152
+ [polygon2.id]: polygon2,
153
+ [arbitrum2.id]: arbitrum2,
154
+ [optimism2.id]: optimism2,
155
+ [base2.id]: base2,
156
+ [avalanche2.id]: avalanche2,
157
+ [gnosis2.id]: gnosis2,
158
+ [sonic2.id]: sonic2
159
+ };
160
+ var SupportedChainIds = Object.values(SupportedChains).map((chain) => chain.id);
161
+
137
162
  // exports/abis/curve/CurveAdapterV1.ts
138
163
  var CurveAdapterV1_ABI = [
139
164
  {
@@ -21013,6 +21038,8 @@ var VaultAdapterV1_ABI = [
21013
21038
  export {
21014
21039
  ADDRESS,
21015
21040
  AggregatorV3Interface_ABI,
21041
+ ChainMain,
21042
+ ChainSide,
21016
21043
  CurveAdapterV1_1_ABI,
21017
21044
  CurveAdapterV1_2_ABI,
21018
21045
  CurveAdapterV1_ABI,
@@ -21051,6 +21078,9 @@ export {
21051
21078
  MorphoChainlinkOracleV2_ABI,
21052
21079
  RewardDistributionV1_ABI,
21053
21080
  Stablecoin_ABI,
21081
+ SupportedChainIds,
21082
+ SupportedChains,
21083
+ SupportedChainsMap,
21054
21084
  VaultAdapterRecoverV1_ABI,
21055
21085
  VaultAdapterV1_ABI,
21056
21086
  getAddressFromChildIndex,
@@ -1,6 +1,36 @@
1
1
  import { arbitrum, avalanche, base, gnosis, mainnet, optimism, polygon, sonic } from 'viem/chains';
2
- import { Address } from 'viem';
3
-
2
+ import { Address, Chain } from 'viem';
3
+
4
+ // network and chains
5
+ export const ChainMain = { mainnet } as const;
6
+ export const ChainSide = {
7
+ polygon,
8
+ arbitrum,
9
+ optimism,
10
+ base,
11
+ avalanche,
12
+ gnosis,
13
+ sonic,
14
+ } as const;
15
+
16
+ // supported chains
17
+ export const SupportedChains = { ...ChainMain, ...ChainSide } as const;
18
+ export type SupportedChain = (typeof SupportedChains)[keyof typeof SupportedChains];
19
+
20
+ export const SupportedChainsMap: { [K in ChainId]: SupportedChain | Chain } = {
21
+ [mainnet.id]: mainnet,
22
+ [polygon.id]: polygon,
23
+ [arbitrum.id]: arbitrum,
24
+ [optimism.id]: optimism,
25
+ [base.id]: base,
26
+ [avalanche.id]: avalanche,
27
+ [gnosis.id]: gnosis,
28
+ [sonic.id]: sonic,
29
+ } as const;
30
+
31
+ export const SupportedChainIds = Object.values(SupportedChains).map((chain) => chain.id);
32
+
33
+ // chain ids
4
34
  export type ChainIdMain = typeof mainnet.id;
5
35
 
6
36
  export type ChainIdSide =
@@ -14,6 +44,7 @@ export type ChainIdSide =
14
44
 
15
45
  export type ChainId = ChainIdMain | ChainIdSide;
16
46
 
47
+ // chain Address
17
48
  export type ChainAddressMainnet = {
18
49
  // identifier
19
50
  chainId: typeof mainnet.id;
@@ -118,6 +149,7 @@ export type ChainAddressSonic = {
118
149
  chainSelector: string;
119
150
  };
120
151
 
152
+ // ChainAddressMap aggregation
121
153
  export type ChainAddressMap = {
122
154
  [mainnet.id]: ChainAddressMainnet;
123
155
  [polygon.id]: ChainAddressPolygon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usdu-finance/usdu-core",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "license": "GPL-3.0",
6
6
  "main": "./dist/index.js",
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "WebFetch(domain:etherscan.io)",
5
- "Bash(yarn run test:*)",
6
- "Bash(npm run compile:*)",
7
- "Bash(npm test:*)",
8
- "WebFetch(domain:docs.curve.finance)"
9
- ],
10
- "deny": []
11
- }
12
- }