index.d.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * ### The `@exodus/bytes` package consists of submodules, there is no single export.
  3. * Import specific submodules instead.
  4. *
  5. * See [README](https://github.com/ExodusOSS/bytes/blob/main/README.md).
  6. *
  7. * Example:
  8. * ```js
  9. * import { fromHex, toHex } from '@exodus/bytes/hex.js'
  10. * import { fromBase64, toBase64, fromBase64url, toBase64url, fromBase64any } from '@exodus/bytes/base64.js'
  11. * import { fromBase32, toBase32, fromBase32hex, toBase32hex } from '@exodus/bytes/base32.js'
  12. * import { fromBase58, toBase58, fromBase58xrp, toBase58xrp } from '@exodus/bytes/base58.js'
  13. * import { fromBech32, toBech32, fromBech32m, toBech32m, getPrefix } from '@exodus/bytes/bech32.js'
  14. * import { fromBigInt, toBigInt } from '@exodus/bytes/bigint.js'
  15. *
  16. * import { utf8fromString, utf8toString, utf8fromStringLoose, utf8toStringLoose } from '@exodus/bytes/utf8.js'
  17. * import { utf16fromString, utf16toString, utf16fromStringLoose, utf16toStringLoose } from '@exodus/bytes/utf16.js'
  18. * import {
  19. * createSinglebyteDecoder, createSinglebyteEncoder,
  20. * windows1252toString, windows1252fromString,
  21. * latin1toString, latin1fromString } from '@exodus/bytes/single-byte.js'
  22. * import { createMultibyteDecoder, createMultibyteEncoder } from '@exodus/bytes/multi-byte.js'
  23. *
  24. * import {
  25. * fromBase58check, toBase58check,
  26. * fromBase58checkSync, toBase58checkSync,
  27. * makeBase58check } from '@exodus/bytes/base58check.js'
  28. * import { fromWifString, toWifString, fromWifStringSync, toWifStringSync } from '@exodus/bytes/wif.js'
  29. *
  30. * // All encodings from the WHATWG Encoding spec
  31. * import { TextDecoder, TextEncoder, TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding.js'
  32. * import { getBOMEncoding, legacyHookDecode, labelToName, normalizeEncoding } from '@exodus/bytes/encoding.js'
  33. *
  34. * // Omits legacy multi-byte decoders to save bundle size
  35. * import { TextDecoder, TextEncoder, TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding-lite.js'
  36. * import { getBOMEncoding, legacyHookDecode, labelToName, normalizeEncoding } from '@exodus/bytes/encoding-lite.js'
  37. *
  38. * // In browser bundles, uses built-in TextDecoder / TextEncoder to save bundle size
  39. * import { TextDecoder, TextEncoder, TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding-browser.js'
  40. * import { getBOMEncoding, legacyHookDecode, labelToName, normalizeEncoding } from '@exodus/bytes/encoding-browser.js'
  41. * ```
  42. */
  43. declare module '@exodus/bytes' {}