@usdu-finance/usdu-core 0.0.5 → 0.0.7
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.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +4 -47
- package/dist/index.mjs +3 -41
- package/exports/address.config.ts +2 -2
- package/exports/index.ts +0 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
1
|
import * as abitype from 'abitype';
|
|
3
2
|
import * as viem_chains from 'viem/chains';
|
|
4
3
|
import { mainnet, polygon, arbitrum, optimism, base, avalanche, gnosis, sonic } from 'viem/chains';
|
|
5
4
|
import * as viem from 'viem';
|
|
6
5
|
import { Chain, Address } from 'viem';
|
|
7
6
|
|
|
8
|
-
declare function getChildFromSeed(seed: string, index: number): ethers.HDNodeWallet;
|
|
9
|
-
declare function getAddressFromChildIndex(seed: string, index: number): string;
|
|
10
|
-
declare function getPublicKeyFromChildIndex(seed: string, index: number): string;
|
|
11
|
-
declare function getPrivateKeyFromChildIndex(seed: string, index: number): string;
|
|
12
|
-
declare function getWalletInto(seed?: string | undefined, index?: string | undefined, amount?: number): void;
|
|
13
|
-
|
|
14
7
|
declare const ChainMain: {
|
|
15
8
|
readonly mainnet: {
|
|
16
9
|
blockExplorers: {
|
|
@@ -22197,4 +22190,4 @@ declare const VaultAdapterV1_ABI: readonly [{
|
|
|
22197
22190
|
readonly type: "function";
|
|
22198
22191
|
}];
|
|
22199
22192
|
|
|
22200
|
-
export { ADDRESS, AggregatorV3Interface_ABI, AragonDao_ABI, AragonDelayedAction_ABI, AragonMultiSig_ABI, AragonVetoMultiSig_ABI, type ChainAddressArbitrum, type ChainAddressAvalanche, type ChainAddressBase, type ChainAddressGnosis, type ChainAddressMainnet, type ChainAddressMap, type ChainAddressOptimism, type ChainAddressPolygon, type ChainAddressSonic, type ChainId, type ChainIdMain, type ChainIdSide, ChainMain, ChainSide, CurveAdapterV1_1_ABI, CurveAdapterV1_2_ABI, CurveAdapterV1_ABI, ERC20Permit_ABI, ERC20_ABI, ErrorsLib_ABI, EventsLib_ABI, ICurveStableSwapNG_ABI, IERC20Metadata_ABI, IERC20Permit_ABI, IERC20_ABI, IERC4626ABI, IMetaMorphoV1_1Base_ABI, IMetaMorphoV1_1StaticTyping_ABI, IMetaMorphoV1_1_ABI, IMorphoBase_ABI, IMorphoChainlinkOracleV2Factory_ABI, IMorphoChainlinkOracleV2_ABI, IMorphoFlashLoanCallback_ABI, IMorphoLiquidateCallback_ABI, IMorphoRepayCallback_ABI, IMorphoStaticTyping_ABI, IMorphoSupplyCallback_ABI, IMorphoSupplyCollateralCallback_ABI, IMorpho_ABI, IMulticall_ABI, IOracle_ABI, IOwnable_ABI, IStablecoinMetadata_ABI, IStablecoinModifier_ABI, IStablecoin_ABI, ITermMaxVault_ABI, MorphoAdapterV1_1_ABI, MorphoAdapterV1_2_ABI, MorphoAdapterV1_ABI, MorphoChainlinkOracleV2_ABI, RewardDistributionV1_ABI, Stablecoin_ABI, type SupportedChain, SupportedChainIds, SupportedChains, SupportedChainsMap, VaultAdapterRecoverV1_ABI, VaultAdapterV1_ABI
|
|
22193
|
+
export { ADDRESS, AggregatorV3Interface_ABI, AragonDao_ABI, AragonDelayedAction_ABI, AragonMultiSig_ABI, AragonVetoMultiSig_ABI, type ChainAddressArbitrum, type ChainAddressAvalanche, type ChainAddressBase, type ChainAddressGnosis, type ChainAddressMainnet, type ChainAddressMap, type ChainAddressOptimism, type ChainAddressPolygon, type ChainAddressSonic, type ChainId, type ChainIdMain, type ChainIdSide, ChainMain, ChainSide, CurveAdapterV1_1_ABI, CurveAdapterV1_2_ABI, CurveAdapterV1_ABI, ERC20Permit_ABI, ERC20_ABI, ErrorsLib_ABI, EventsLib_ABI, ICurveStableSwapNG_ABI, IERC20Metadata_ABI, IERC20Permit_ABI, IERC20_ABI, IERC4626ABI, IMetaMorphoV1_1Base_ABI, IMetaMorphoV1_1StaticTyping_ABI, IMetaMorphoV1_1_ABI, IMorphoBase_ABI, IMorphoChainlinkOracleV2Factory_ABI, IMorphoChainlinkOracleV2_ABI, IMorphoFlashLoanCallback_ABI, IMorphoLiquidateCallback_ABI, IMorphoRepayCallback_ABI, IMorphoStaticTyping_ABI, IMorphoSupplyCallback_ABI, IMorphoSupplyCollateralCallback_ABI, IMorpho_ABI, IMulticall_ABI, IOracle_ABI, IOwnable_ABI, IStablecoinMetadata_ABI, IStablecoinModifier_ABI, IStablecoin_ABI, ITermMaxVault_ABI, MorphoAdapterV1_1_ABI, MorphoAdapterV1_2_ABI, MorphoAdapterV1_ABI, MorphoChainlinkOracleV2_ABI, RewardDistributionV1_ABI, Stablecoin_ABI, type SupportedChain, SupportedChainIds, SupportedChains, SupportedChainsMap, VaultAdapterRecoverV1_ABI, VaultAdapterV1_ABI };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
1
|
import * as abitype from 'abitype';
|
|
3
2
|
import * as viem_chains from 'viem/chains';
|
|
4
3
|
import { mainnet, polygon, arbitrum, optimism, base, avalanche, gnosis, sonic } from 'viem/chains';
|
|
5
4
|
import * as viem from 'viem';
|
|
6
5
|
import { Chain, Address } from 'viem';
|
|
7
6
|
|
|
8
|
-
declare function getChildFromSeed(seed: string, index: number): ethers.HDNodeWallet;
|
|
9
|
-
declare function getAddressFromChildIndex(seed: string, index: number): string;
|
|
10
|
-
declare function getPublicKeyFromChildIndex(seed: string, index: number): string;
|
|
11
|
-
declare function getPrivateKeyFromChildIndex(seed: string, index: number): string;
|
|
12
|
-
declare function getWalletInto(seed?: string | undefined, index?: string | undefined, amount?: number): void;
|
|
13
|
-
|
|
14
7
|
declare const ChainMain: {
|
|
15
8
|
readonly mainnet: {
|
|
16
9
|
blockExplorers: {
|
|
@@ -22197,4 +22190,4 @@ declare const VaultAdapterV1_ABI: readonly [{
|
|
|
22197
22190
|
readonly type: "function";
|
|
22198
22191
|
}];
|
|
22199
22192
|
|
|
22200
|
-
export { ADDRESS, AggregatorV3Interface_ABI, AragonDao_ABI, AragonDelayedAction_ABI, AragonMultiSig_ABI, AragonVetoMultiSig_ABI, type ChainAddressArbitrum, type ChainAddressAvalanche, type ChainAddressBase, type ChainAddressGnosis, type ChainAddressMainnet, type ChainAddressMap, type ChainAddressOptimism, type ChainAddressPolygon, type ChainAddressSonic, type ChainId, type ChainIdMain, type ChainIdSide, ChainMain, ChainSide, CurveAdapterV1_1_ABI, CurveAdapterV1_2_ABI, CurveAdapterV1_ABI, ERC20Permit_ABI, ERC20_ABI, ErrorsLib_ABI, EventsLib_ABI, ICurveStableSwapNG_ABI, IERC20Metadata_ABI, IERC20Permit_ABI, IERC20_ABI, IERC4626ABI, IMetaMorphoV1_1Base_ABI, IMetaMorphoV1_1StaticTyping_ABI, IMetaMorphoV1_1_ABI, IMorphoBase_ABI, IMorphoChainlinkOracleV2Factory_ABI, IMorphoChainlinkOracleV2_ABI, IMorphoFlashLoanCallback_ABI, IMorphoLiquidateCallback_ABI, IMorphoRepayCallback_ABI, IMorphoStaticTyping_ABI, IMorphoSupplyCallback_ABI, IMorphoSupplyCollateralCallback_ABI, IMorpho_ABI, IMulticall_ABI, IOracle_ABI, IOwnable_ABI, IStablecoinMetadata_ABI, IStablecoinModifier_ABI, IStablecoin_ABI, ITermMaxVault_ABI, MorphoAdapterV1_1_ABI, MorphoAdapterV1_2_ABI, MorphoAdapterV1_ABI, MorphoChainlinkOracleV2_ABI, RewardDistributionV1_ABI, Stablecoin_ABI, type SupportedChain, SupportedChainIds, SupportedChains, SupportedChainsMap, VaultAdapterRecoverV1_ABI, VaultAdapterV1_ABI
|
|
22193
|
+
export { ADDRESS, AggregatorV3Interface_ABI, AragonDao_ABI, AragonDelayedAction_ABI, AragonMultiSig_ABI, AragonVetoMultiSig_ABI, type ChainAddressArbitrum, type ChainAddressAvalanche, type ChainAddressBase, type ChainAddressGnosis, type ChainAddressMainnet, type ChainAddressMap, type ChainAddressOptimism, type ChainAddressPolygon, type ChainAddressSonic, type ChainId, type ChainIdMain, type ChainIdSide, ChainMain, ChainSide, CurveAdapterV1_1_ABI, CurveAdapterV1_2_ABI, CurveAdapterV1_ABI, ERC20Permit_ABI, ERC20_ABI, ErrorsLib_ABI, EventsLib_ABI, ICurveStableSwapNG_ABI, IERC20Metadata_ABI, IERC20Permit_ABI, IERC20_ABI, IERC4626ABI, IMetaMorphoV1_1Base_ABI, IMetaMorphoV1_1StaticTyping_ABI, IMetaMorphoV1_1_ABI, IMorphoBase_ABI, IMorphoChainlinkOracleV2Factory_ABI, IMorphoChainlinkOracleV2_ABI, IMorphoFlashLoanCallback_ABI, IMorphoLiquidateCallback_ABI, IMorphoRepayCallback_ABI, IMorphoStaticTyping_ABI, IMorphoSupplyCallback_ABI, IMorphoSupplyCollateralCallback_ABI, IMorpho_ABI, IMulticall_ABI, IOracle_ABI, IOwnable_ABI, IStablecoinMetadata_ABI, IStablecoinModifier_ABI, IStablecoin_ABI, ITermMaxVault_ABI, MorphoAdapterV1_1_ABI, MorphoAdapterV1_2_ABI, MorphoAdapterV1_ABI, MorphoChainlinkOracleV2_ABI, RewardDistributionV1_ABI, Stablecoin_ABI, type SupportedChain, SupportedChainIds, SupportedChains, SupportedChainsMap, VaultAdapterRecoverV1_ABI, VaultAdapterV1_ABI };
|
package/dist/index.js
CHANGED
|
@@ -70,50 +70,12 @@ __export(exports_exports, {
|
|
|
70
70
|
SupportedChains: () => SupportedChains,
|
|
71
71
|
SupportedChainsMap: () => SupportedChainsMap,
|
|
72
72
|
VaultAdapterRecoverV1_ABI: () => VaultAdapterRecoverV1_ABI,
|
|
73
|
-
VaultAdapterV1_ABI: () => VaultAdapterV1_ABI
|
|
74
|
-
getAddressFromChildIndex: () => getAddressFromChildIndex,
|
|
75
|
-
getChildFromSeed: () => getChildFromSeed,
|
|
76
|
-
getPrivateKeyFromChildIndex: () => getPrivateKeyFromChildIndex,
|
|
77
|
-
getPublicKeyFromChildIndex: () => getPublicKeyFromChildIndex,
|
|
78
|
-
getWalletInto: () => getWalletInto
|
|
73
|
+
VaultAdapterV1_ABI: () => VaultAdapterV1_ABI
|
|
79
74
|
});
|
|
80
75
|
module.exports = __toCommonJS(exports_exports);
|
|
81
76
|
|
|
82
|
-
// helper/wallet.ts
|
|
83
|
-
var import_ethers = require("ethers");
|
|
84
|
-
function getChildFromSeed(seed, index) {
|
|
85
|
-
return import_ethers.ethers.HDNodeWallet.fromPhrase(seed, void 0, `m/44'/60'/0'/0/${index}`);
|
|
86
|
-
}
|
|
87
|
-
function getAddressFromChildIndex(seed, index) {
|
|
88
|
-
return getChildFromSeed(seed, index).address;
|
|
89
|
-
}
|
|
90
|
-
function getPublicKeyFromChildIndex(seed, index) {
|
|
91
|
-
return getChildFromSeed(seed, index).publicKey;
|
|
92
|
-
}
|
|
93
|
-
function getPrivateKeyFromChildIndex(seed, index) {
|
|
94
|
-
return getChildFromSeed(seed, index).privateKey;
|
|
95
|
-
}
|
|
96
|
-
function getWalletInto(seed = process.env.DEPLOYER_SEED, index = process.env.DEPLOYER_SEED_INDEX, amount = 3) {
|
|
97
|
-
if (!seed) throw new Error("Failed to import the seed string from .env");
|
|
98
|
-
if (!index) throw new Error("Failed to import the index string from .env");
|
|
99
|
-
console.log("seed:", seed);
|
|
100
|
-
const start = index && index?.length > 0 ? parseInt(index) : 0;
|
|
101
|
-
for (let i = start; i < start + amount; i++) {
|
|
102
|
-
const w = getChildFromSeed(seed, i);
|
|
103
|
-
console.log("Wallet", i);
|
|
104
|
-
console.log({
|
|
105
|
-
address: w.address,
|
|
106
|
-
pubKey: w.publicKey,
|
|
107
|
-
privKey: w.privateKey,
|
|
108
|
-
path: w.path,
|
|
109
|
-
index: w.index
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
77
|
// exports/address.config.ts
|
|
115
78
|
var import_chains = require("viem/chains");
|
|
116
|
-
var import_viem = require("viem");
|
|
117
79
|
var ADDRESS = {
|
|
118
80
|
[import_chains.mainnet.id]: {
|
|
119
81
|
// identifier
|
|
@@ -171,11 +133,11 @@ var ADDRESS = {
|
|
|
171
133
|
usduCurveAdapterV1_1_USDC_2: "0x77cBb2f180F55dd2916bfC78F879A2C2dE37f638",
|
|
172
134
|
// term-max vaults
|
|
173
135
|
termmaxVaultUSDU_Core: "0x18d91B5e3218AB16Ef86fB7Cb054CB48bA1e8b8e",
|
|
174
|
-
termmaxVaultUSDU_RWA:
|
|
136
|
+
termmaxVaultUSDU_RWA: "0xe0c139b915a637a519cb71c9f80cdd1f123b192e",
|
|
175
137
|
termmaxVaultUSDU_Yield: "0xa231215C8a78E18205Ec5Ba2B52e98d99Bf43236",
|
|
176
138
|
// term-max adapters
|
|
177
139
|
termmaxVaultAdapterRecoverV1_Core: "0x8F36bbEe57aCB4857CB97898020B529969FDF221",
|
|
178
|
-
termmaxVaultAdapterRecoverV1_RWA:
|
|
140
|
+
termmaxVaultAdapterRecoverV1_RWA: "0x397FB4A34757Ac180C0841b26131F25040e2E50B",
|
|
179
141
|
termmaxVaultAdapterRecoverV1_Yield: "0x5febEFD5AeCFefB3352c5Edd49d634B1456c4bD7",
|
|
180
142
|
// erc20 tokens
|
|
181
143
|
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -23732,10 +23694,5 @@ var VaultAdapterV1_ABI = [
|
|
|
23732
23694
|
SupportedChains,
|
|
23733
23695
|
SupportedChainsMap,
|
|
23734
23696
|
VaultAdapterRecoverV1_ABI,
|
|
23735
|
-
VaultAdapterV1_ABI
|
|
23736
|
-
getAddressFromChildIndex,
|
|
23737
|
-
getChildFromSeed,
|
|
23738
|
-
getPrivateKeyFromChildIndex,
|
|
23739
|
-
getPublicKeyFromChildIndex,
|
|
23740
|
-
getWalletInto
|
|
23697
|
+
VaultAdapterV1_ABI
|
|
23741
23698
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
// helper/wallet.ts
|
|
2
|
-
import { ethers } from "ethers";
|
|
3
|
-
function getChildFromSeed(seed, index) {
|
|
4
|
-
return ethers.HDNodeWallet.fromPhrase(seed, void 0, `m/44'/60'/0'/0/${index}`);
|
|
5
|
-
}
|
|
6
|
-
function getAddressFromChildIndex(seed, index) {
|
|
7
|
-
return getChildFromSeed(seed, index).address;
|
|
8
|
-
}
|
|
9
|
-
function getPublicKeyFromChildIndex(seed, index) {
|
|
10
|
-
return getChildFromSeed(seed, index).publicKey;
|
|
11
|
-
}
|
|
12
|
-
function getPrivateKeyFromChildIndex(seed, index) {
|
|
13
|
-
return getChildFromSeed(seed, index).privateKey;
|
|
14
|
-
}
|
|
15
|
-
function getWalletInto(seed = process.env.DEPLOYER_SEED, index = process.env.DEPLOYER_SEED_INDEX, amount = 3) {
|
|
16
|
-
if (!seed) throw new Error("Failed to import the seed string from .env");
|
|
17
|
-
if (!index) throw new Error("Failed to import the index string from .env");
|
|
18
|
-
console.log("seed:", seed);
|
|
19
|
-
const start = index && index?.length > 0 ? parseInt(index) : 0;
|
|
20
|
-
for (let i = start; i < start + amount; i++) {
|
|
21
|
-
const w = getChildFromSeed(seed, i);
|
|
22
|
-
console.log("Wallet", i);
|
|
23
|
-
console.log({
|
|
24
|
-
address: w.address,
|
|
25
|
-
pubKey: w.publicKey,
|
|
26
|
-
privKey: w.privateKey,
|
|
27
|
-
path: w.path,
|
|
28
|
-
index: w.index
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
1
|
// exports/address.config.ts
|
|
34
2
|
import { arbitrum, avalanche, base, gnosis, mainnet, optimism, polygon, sonic } from "viem/chains";
|
|
35
|
-
import { zeroAddress } from "viem";
|
|
36
3
|
var ADDRESS = {
|
|
37
4
|
[mainnet.id]: {
|
|
38
5
|
// identifier
|
|
@@ -90,11 +57,11 @@ var ADDRESS = {
|
|
|
90
57
|
usduCurveAdapterV1_1_USDC_2: "0x77cBb2f180F55dd2916bfC78F879A2C2dE37f638",
|
|
91
58
|
// term-max vaults
|
|
92
59
|
termmaxVaultUSDU_Core: "0x18d91B5e3218AB16Ef86fB7Cb054CB48bA1e8b8e",
|
|
93
|
-
termmaxVaultUSDU_RWA:
|
|
60
|
+
termmaxVaultUSDU_RWA: "0xe0c139b915a637a519cb71c9f80cdd1f123b192e",
|
|
94
61
|
termmaxVaultUSDU_Yield: "0xa231215C8a78E18205Ec5Ba2B52e98d99Bf43236",
|
|
95
62
|
// term-max adapters
|
|
96
63
|
termmaxVaultAdapterRecoverV1_Core: "0x8F36bbEe57aCB4857CB97898020B529969FDF221",
|
|
97
|
-
termmaxVaultAdapterRecoverV1_RWA:
|
|
64
|
+
termmaxVaultAdapterRecoverV1_RWA: "0x397FB4A34757Ac180C0841b26131F25040e2E50B",
|
|
98
65
|
termmaxVaultAdapterRecoverV1_Yield: "0x5febEFD5AeCFefB3352c5Edd49d634B1456c4bD7",
|
|
99
66
|
// erc20 tokens
|
|
100
67
|
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -23650,10 +23617,5 @@ export {
|
|
|
23650
23617
|
SupportedChains,
|
|
23651
23618
|
SupportedChainsMap,
|
|
23652
23619
|
VaultAdapterRecoverV1_ABI,
|
|
23653
|
-
VaultAdapterV1_ABI
|
|
23654
|
-
getAddressFromChildIndex,
|
|
23655
|
-
getChildFromSeed,
|
|
23656
|
-
getPrivateKeyFromChildIndex,
|
|
23657
|
-
getPublicKeyFromChildIndex,
|
|
23658
|
-
getWalletInto
|
|
23620
|
+
VaultAdapterV1_ABI
|
|
23659
23621
|
};
|
|
@@ -66,12 +66,12 @@ export const ADDRESS: ChainAddressMap = {
|
|
|
66
66
|
|
|
67
67
|
// term-max vaults
|
|
68
68
|
termmaxVaultUSDU_Core: '0x18d91B5e3218AB16Ef86fB7Cb054CB48bA1e8b8e',
|
|
69
|
-
termmaxVaultUSDU_RWA:
|
|
69
|
+
termmaxVaultUSDU_RWA: '0xe0c139b915a637a519cb71c9f80cdd1f123b192e',
|
|
70
70
|
termmaxVaultUSDU_Yield: '0xa231215C8a78E18205Ec5Ba2B52e98d99Bf43236',
|
|
71
71
|
|
|
72
72
|
// term-max adapters
|
|
73
73
|
termmaxVaultAdapterRecoverV1_Core: '0x8F36bbEe57aCB4857CB97898020B529969FDF221',
|
|
74
|
-
termmaxVaultAdapterRecoverV1_RWA:
|
|
74
|
+
termmaxVaultAdapterRecoverV1_RWA: '0x397FB4A34757Ac180C0841b26131F25040e2E50B',
|
|
75
75
|
termmaxVaultAdapterRecoverV1_Yield: '0x5febEFD5AeCFefB3352c5Edd49d634B1456c4bD7',
|
|
76
76
|
|
|
77
77
|
// erc20 tokens
|
package/exports/index.ts
CHANGED