Prerequisites
1. NPM install
npm i @magmaprotocol/magma-clmm-sdk
2. Setting Up Configuration
Magma Typescript SDK includes a default initialization method that allows for quick generation of the Magma SDK configuration. You can utilize the src/config/initMagmaSDK method to swiftly initialize the configuration. You have the option to select either 'mainnet' or 'testnet' for the network.
import { initMagmaSDK } from '@magmaprotocol/magma-clmm-sdk'
const magmaClmmSDK = initMagmaSDK({network: 'mainnet})
If you wish to set your own full node URL and simulate address, you can do so as follows:
import { initMagmaSDK } from '@magmaprotocol/magma-clmm-sdk'
const network = 'mainnnet';
const fullNodeUrl = "https://..."
const simulationAccount = "0x..."
const magmaClmmSDK = initMagmaSDK({network, fullNodeUrl, simulationAccount})
Now, you can start using Magma SDK!
Last updated