- Send a transaction
- Deposit funds to a DeFi opportunity (
earn()method) - Withdraw funds to a DeFi opportunity (
withdraw()method)
earn() method)withdraw() method)Init SDK
import { MyceliumSDK } from '@mycelium-sdk/core';
const sdk = await MyceliumSDK.init({
apiKey:
"sk_e010bc44958665229cb89634448f81f532231ce131c4eb98816eadcb2e6ed7fa47",
chainId: 8453,
protocolsSecurityConfig: {
riskLevel: "low",
},
});
Deposit using paymaster
const USDC_TOKEN_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
const txnHash = await wallet.earn(
selectedVault.vaultInfo,
amountToDeposit,
{
paymasterToken: USDC_TOKEN_ADDRESS,
}
);