Integrating Magma-ts-SDK: A Comprehensive Guide, Please see details in document.
Explore the document »
Magma-ts-SDK is the official software development kit (SDK) specifically designed for seamless integration with Magma-CLMM. It provides developers with the necessary tools and resources to easily connect and interact with Magma-CLMM, enabling the development of robust and efficient applications.
To integrate our SDK into your local project, please follow the example steps provided below. Please see details in document.
npm i @magmaprotocol/magma-ts-sdkOur SDK now 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-ts-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-ts-sdk'
const network = 'mainnnet'
const fullNodeUrl = 'https://...'
const simulationAccount = '0x...'
const magmaClmmSDK = initMagmaSDK({ network, fullNodeUrl, simulationAccount })Now, you can start using Magma SDK.
You can view this typescript sdk in
Magma Development Documents.
Magma-ts-SDK released under the Apache license. See the LICENSE file for details.
Use the following links to learn more about Magma:
-
Learn more about working with Magma in the Magma Documentation.
-
Join the Magma community on Magma Discord.