UNPKG

@rarimo/providers-near

Version:

Features of the Rarimo SDK that provide access to wallets and the ability to interact with them on the NEAR blockchain.

21 lines (20 loc) 652 B
import { utils } from "near-api-js"; export const MAX_GAS_LIMIT = '300000000000000'; export const NO_DEPOSIT = '0'; export const nearToYocto = (amount)=>{ return utils.format.parseNearAmount(amount); }; export const yoctoToNear = (amount)=>{ return utils.format.formatNearAmount(amount); }; export function getNearExplorerTxUrl(explorerUrl, txHash) { return `${explorerUrl}/transactions/${txHash}`; } export function getNearExplorerAddressUrl(explorerUrl, address) { return `${explorerUrl}/accounts/${address}`; } export function handleNearError(error) { // TODO: handle error throw error; } //# sourceMappingURL=helpers.js.map