@lido-sdk/helpers
Version:
This project is being slowly deprecated and may not receive further updates. Check out [modern Lido SDK](https://github.com/lidofinance/lido-ethereum-sdk/pulls) to access latest functionality. It is actively maintained and is built for interacting with Li
74 lines (53 loc) • 1.98 kB
Markdown
This project is being slowly deprecated and may not receive further updates.
Check out [modern Lido SDK](https://github.com/lidofinance/lido-ethereum-sdk/pulls) to access latest functionality. It is actively maintained and is built for interacting with Lido Protocol.
Helpers for Lido Finance projects.
Part of [Lido JS SDK](https://github.com/lidofinance/lido-js-sdk/#readme)
- [Install](
- [Etherscan](
- [getEtherscanTxLink](
- [getEtherscanTokenLink](
- [getEtherscanAddressLink](
- [Open window](
```bash
yarn add @lido-sdk/helpers
```
A set of functions for generating links to [etherscan](https://etherscan.io/)
```ts
import { getEtherscanTxLink } from '@lido-sdk/helpers';
import { CHAINS } from '@lido-sdk/constants';
const link = getEtherscanTxLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/tx/0x0000000000000000000000000000000000000000000000000000000000000000
```
```ts
import { getEtherscanTokenLink } from '@lido-sdk/helpers';
import { CHAINS } from '@lido-sdk/constants';
const link = getEtherscanTokenLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000
```
```ts
import { getEtherscanAddressLink } from '@lido-sdk/helpers';
import { CHAINS } from '@lido-sdk/constants';
const link = getEtherscanAddressLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000
```
```ts
import { openWindow } from '@lido-sdk/helpers';
openWindow('https://lido.fi');
```