docs ⦿ dedot 🧑‍💻
TypinkXTelegramGithub
dedot 🧑‍💻
dedot 🧑‍💻
  • Welcome to Dedot
  • Why Dedot?
  • Getting started
    • Installation
    • Connect to network
    • @polkadot/api -> dedot
    • Packages structure
  • Clients & Providers
    • Providers
    • Clients
  • Client API
    • ChainApi
    • Constants
    • Runtime APIs
    • Storage Queries
    • Transactions
    • Events
    • Errors
  • ink! Smart Contracts
    • Introduction
    • Generate Types & APIs
    • Deploy contracts
    • Queries
    • Transactions
    • Events
    • Handle errors
  • CLI
  • Keyring & Signer
  • Runtime upgrades
  • Type system
  • Utilities
    • HexString
    • Uint8Array (U8a)
    • String
    • Hash functions
    • Address
    • BigInt & number
    • Balances
    • Merkleized Metadata
  • Help & FAQ
    • Tutorials
      • Develop ink! dApp using Typink
    • Built with Dedot
    • Forum Posts
    • Telegram
    • Github
    • API Reference
Powered by GitBook
On this page
  • bnToHex
  • bnToU8a
  • bnMax
  • bnMin
  • bnAbs
  • numberToHex
  • numberToU8a

Was this helpful?

Edit on GitHub
  1. Utilities

BigInt & number

bnToHex

Convert bigint to hex

import { bnToHex } from 'dedot/utils';

bnToU8a

Convert bigint to Uint8Array

import { bnToU8a } from 'dedot/utils';

bnMax

Return the bigger bigint value

import { bnMax } from 'dedot/utils';

bnMin

Return the smaller bigint value

import { bnMin } from 'dedot/utils';

bnAbs

Return the absolute value of a bigint

import { bnAbs } from 'dedot/utils';

numberToHex

Convert a number to a hex string

import { numberToHex } from 'dedot/utils';

numberToU8a

Convert a number to a Uint8Array

import { numberToU8a } from 'dedot/utils';
PreviousAddressNextBalances

Last updated 9 months ago

Was this helpful?