Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@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 8 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.