
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@kyvejs/coins
Advanced tools
@kyvejs/coins is an sdk for doing arithmetic operations on Cosmos Coins, it is an exact implementation of the sdk.Coins type in Typescript, the original Golang implementation can be found here: https://github.com/cosmos/cosmos-sdk/blob/main/types/coin.go
@kyvejs/coins is an sdk for doing arithmetic operations on Cosmos Coins, it is an exact implementation of the sdk.Coins type in Typescript, the original Golang implementation can be found here: https://github.com/cosmos/cosmos-sdk/blob/main/types/coin.go
You can install this package with npm or yarn:
yarn add @kyvejs/coins
npm i @kyvejs/coins
Here are some examples on how to use the coins sdk:
Arithmetic methods:
new Coins("1acoin,2bcoin").add({denom: "ccoin", amount: "3"}).mul(2).toString()
-> "2acoin,4bcoin,6ccoin"
new Coins("1acoin,2bcoin,4ccoin").sub("1acoin").div(2).toArray()
-> [{denom: "bcoin", amount: "1"}, {denom: "ccoin", amount: "2"}]
Checks and info methods:
const myCoins = new Coins("1acoin,2bcoin")
myCoins.isZero()
-> false
myCoins.len()
-> 2
myCoins.equal("1acoin,2bcoin")
-> true
myCoins.amountOf("bcoin")
-> "2"
myCoins.min("1bcoin,1ccoin").toString()
-> "1bcoin"
myCoins.max("1bcoin,1ccoin").toString()
-> "1acoin,2bcoin,1ccoin"
Comparison methods:
const myCoins = new Coins({denom: "bcoin", amount: "1"}, {denom: "ccoin", amount: "2"})
new Coins("1acoin,2bcoin,3ccoin").isAllGT(myCoins)
-> true
new Coins("2bcoin,1ccoin").isAnyLT(myCoins)
-> true
The following methods are available on the Coins class:
FAQs
@kyvejs/coins is an sdk for doing arithmetic operations on Cosmos Coins, it is an exact implementation of the sdk.Coins type in Typescript, the original Golang implementation can be found here: https://github.com/cosmos/cosmos-sdk/blob/main/types/coin.go
The npm package @kyvejs/coins receives a total of 0 weekly downloads. As such, @kyvejs/coins popularity was classified as not popular.
We found that @kyvejs/coins demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.