Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@xchainjs/xchain-thorchain-amm
Advanced tools
module that exposes estimating & swappping cryptocurrency assets on thorchain
THORChain AMM is a module that allows users and developers to interact with the THORChain protocol without having to worry about the underlining particularities of the protocol.
yarn add @xchainjs/xchain-thorchain-amm
or
npm install @xchainjs/xchain-thorchain-amm
Using Thorchain AMM, you can initialize the main class of the module in consultation mode if you do not provide any parameters, this means you could retrieve information from the protocol, but you will not be able to make actions the protocol needs you to sign.
import { ThorchainAMM } from '@xchainjs/xchain-thorchain-amm'
const thorchainAmm = new ThorchainAMM()
Otherwise, if you want to be able make actions the protocol needs you to sign, you will need to initialize the main class of the protocol as follows
import { ThorchainAMM } from '@xchainjs/xchain-thorchain-amm'
import { ThorchainQuery } from '@xchainjs/xchain-thorchain-query'
import { Wallet } from '@xchainjs/xchain-wallet'
const thorChainQuery = new ThorchainQuery()
const wallet = new Wallet({
// Your XChainJS clients
})
const thorchainAmm = new ThorchainAMM(thorChainQuery, wallet)
Using THORChain AMM package, you could easily implement the following features
You can find examples using the THORChain AMM package in the thorchain-amm examples folder.
More information about how to use the Thorchain AMM package can be found on documentation
If you plan on using the publically accessible endpoints provided by Nine Realms(listed below), ensure that you add a valid 'x-client-id' to all requests
Example
import cosmosclient from '@cosmos-client/core'
import axios from 'axios'
import { register9Rheader } from '@xchainjs/xchain-util'
register9Rheader(axios)
register9Rheader(cosmosclient.config.globalAxios)
FAQs
module that exposes estimating & swappping cryptocurrency assets on thorchain
The npm package @xchainjs/xchain-thorchain-amm receives a total of 214 weekly downloads. As such, @xchainjs/xchain-thorchain-amm popularity was classified as not popular.
We found that @xchainjs/xchain-thorchain-amm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.