
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@liqwid2021/liqwid-sdk
Advanced tools
A JavaScript SDK for Ethereum and the Liqwid Protocol. Wraps around Ethers.js. Works in the web browser and Node.js.
This SDK is in open beta, and is constantly under development.
Simple methods for using the Liqwid protocol.
const liqwid = new Liqwid(window.ethereum) // in a web browser
// Ethers.js overrides are an optional 3rd parameter for `supply`
const trxOptions = { gasLimit: 250000, mantissa: false }
(async function() {
console.log('Supplying ADA to the Liqwid protocol...')
const trx = await liqwid.supply(Liqwid.ADA, 1)
console.log('Ethers.js transaction object', trx, trxOptions)
})().catch(console.error)
Web Browser
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@liqwid2021/liqwid-sdk@latest/dist/browser/liqwid.min.js"></script>
<script type="text/javascript">
window.Liqwid; // or `Liqwid`
</script>
Node.js
npm install @liqwid2021/liqwid-sdk
const Liqwid = require('@liqwid2021/liqwid-sdk');
// or, when using ES6
import Liqwid from '@liqwid2021/liqwid-sdk';
The following are valid Ethereum providers for initialization of the SDK.
new Liqwid(window.ethereum)
new Liqwid('http://127.0.0.1:8545')
new Liqwid()
new Liqwid('rinkeby')
// Init with private key (server side)
new Liqwid('https://rinkeby.infura.io/v3/_your_project_id_', {
privateKey: '0x_your_private_key_', // preferably with environment variable
});
// Init with HD mnemonic (server side)
new Liqwid('rinkeby', {
mnemonic: 'clutch captain shoe...', // preferably with environment variable
})
Names of contracts, their addresses, ABIs, token decimals, and more can be found in src/constants.ts.
Addresses, for all networks, can be easily fetched using the getAddress function, combined with contract name constants.
console.log(Liqwid.LQ, Liqwid.qLQ, Liqwid.ADA, Liqwid.qADA)
// LQ, qLQ, ADA, qADA
const address = Liqwid.util.getAddress(Liqwid.ADA);
git clone git@gitlab.com:liqwid/liqwid-sdk.git
cd liqwid-sdk
nvm use
yarn install
yarn build
<!-- Local build (do `npm install` first) -->
<script type="text/javascript" src="./dist/browser/liqwid.min.js"></script>
<!-- Public NPM -> jsdeliver build -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@liqwid2021/liqwid-sdk@latest/dist/browser/liqwid.min.js"></script>
// Local build (do `npm install` first)
const Liqwid = require('./dist/nodejs/index.js')
// Public NPM build
const Liqwid = require('@liqwid2021/liqwid-sdk')
FAQs
A JavaScript SDK for the Liqwid Protocol
We found that @liqwid2021/liqwid-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.