
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.
@defisaver/positions-sdk
Advanced tools
Supported protocols: - [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker) - [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark) - [CrvUSD](https://github.com/defisaver/defisaver-positions-sdk/t
Supported protocols:
Supported Node version is v10.
npm install
(first time)npm run build
build
command will generate contracts and build ejs and esm folders
This is a Compound V3 example, and every other protocol is similar
import { compoundV3 } from '@defisaver/positions-sdk';
// every protocol has market data and user data getters
const {
getCompoundV3MarketsData,
getCompoundV3AccountData,
} = compoundV3;
const provider = 'Your RPC provider';
const user = '0x123...';
const { assetsData } = await getCompoundV3MarketsData(
provider, // rpc for the network you are using (note: can be tenderly or any other testnet rpc)
1, // network
selectedMarket, // market object like in /src/markets/compound/index.ts
provider, // this must be mainnet rpc - used for getting prices onchain and calculating apys
);
const userData = await getCompoundV3AccountData(
provider,
1, // network
userAddress, // EOA or DSProxy
'', // proxy address of the user, or just empty string if checking for EOA
{
selectedMarket, // market object as in /src/markets/compound/index.ts
assetsData,
}
);
More examples found here
npm run test
- Run all tests
npm run test-single --name=your_test_name
- Run single test for specified name e.g. for MyTest.js test name is MyTest
FAQs
Supported protocols: - [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker) - [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark) - [CrvUSD](https://github.com/defisaver/defisaver-positions-sd
The npm package @defisaver/positions-sdk receives a total of 1,572 weekly downloads. As such, @defisaver/positions-sdk popularity was classified as popular.
We found that @defisaver/positions-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.