@knine-sdk/helpers
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Helpers

Helpers for Knine projects. Part of Knine JS SDK

Install

yarn add @knine-sdk/helpers

Etherscan

A set of functions for generating links to etherscan

getEtherscanTxLink

import { getEtherscanTxLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';

const link = getEtherscanTxLink(
  CHAINS.Mainnet,
  '0x0000000000000000000000000000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/tx/0x0000000000000000000000000000000000000000000000000000000000000000

getEtherscanTokenLink

import { getEtherscanTokenLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';

const link = getEtherscanTokenLink(
  CHAINS.Mainnet,
  '0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000

getEtherscanAddressLink

import { getEtherscanAddressLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';

const link = getEtherscanAddressLink(
  CHAINS.Mainnet,
  '0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000

Open window

import { openWindow } from '@knine-sdk/helpers';

openWindow('https://knine.io');

Package Sidebar

Install

npm i @knine-sdk/helpers

Weekly Downloads

59

Version

1.0.5

License

MIT

Unpacked Size

11.8 kB

Total Files

19

Last publish

Collaborators

  • ekalinins
  • kiryaft90
  • rocknblock