@knine-sdk/helpers
v1.1.4
Published
Helpers for Knine projects. Part of Knine JS SDK
Downloads
61
Readme
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');