@knine-sdk/helpers
v1.1.4
Published
Helpers for Knine projects. Part of Knine JS SDK
Readme
Helpers
Helpers for Knine projects. Part of Knine JS SDK
Install
yarn add @knine-sdk/helpersEtherscan
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/0x0000000000000000000000000000000000000000000000000000000000000000getEtherscanTokenLink
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/0x0000000000000000000000000000000000000000getEtherscanAddressLink
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/0x0000000000000000000000000000000000000000Open window
import { openWindow } from '@knine-sdk/helpers';
openWindow('https://knine.io');