Main SDK facade for integrating wallets and protocols.
This class encapsulates:
Smart Router
ChainManager
By default, if no chain config is provided, it uses the public RPC and Bundler for the Base chain
import { MyceliumSDK, type MyceliumSDKConfig } from '@mycelium-sdk/core';const config: MyceliumSDKConfig = { walletsConfig: { /* ... */ }, protocolsRouterConfig: { /* ... */ }, chain: { /* ... */ }, coinbaseCDPConfig: { /* ... */ }, integratorId: 'MyceliumApp',};const sdk = new MyceliumSDK(config);const {embeddedWalletId, smartWallet} = await sdk.wallet.createAccount();const balance = await smartWallet.getBalance(); Copy
import { MyceliumSDK, type MyceliumSDKConfig } from '@mycelium-sdk/core';const config: MyceliumSDKConfig = { walletsConfig: { /* ... */ }, protocolsRouterConfig: { /* ... */ }, chain: { /* ... */ }, coinbaseCDPConfig: { /* ... */ }, integratorId: 'MyceliumApp',};const sdk = new MyceliumSDK(config);const {embeddedWalletId, smartWallet} = await sdk.wallet.createAccount();const balance = await smartWallet.getBalance();
Creates a new SDK instance
SDK configuration (networks, wallets, protocol router settings)
Throws if an unsupported wallet provider is given
MyceliumSDKConfig
Returns the chain manager instance for multi-chain operations
ChainManager instance of the type ChainManager
More about methods in ChainManager
Returns a funding namespace to manage top ups & cash outs configurations
Funding namespace of the type FundingNamespace
More about methods in FundingNamespace
Readonly
Returns a unified wallet namespace to manage embedded/smart wallets and related operations
Main SDK facade for integrating wallets and protocols.
Remarks
This class encapsulates:
Smart Router),ChainManager),By default, if no chain config is provided, it uses the public RPC and Bundler for the Base chain
Example