PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@polkadot/util/bn

Просмотр файла: toU8a.d.ts

import type { NumberOptions, ToBn } from '../types.js';
import type { BN } from './bn.js';
/**
 * @name bnToU8a
 * @summary Creates a Uint8Array object from a BN.
 * @description
 * `null`/`undefined`/`NaN` inputs returns an empty `Uint8Array` result. `BN` input values return the actual bytes value converted to a `Uint8Array`. Optionally convert using little-endian format if `isLE` is set.
 * @example
 * <BR>
 *
 * ```javascript
 * import { bnToU8a } from '@polkadot/util';
 *
 * bnToU8a(new BN(0x1234)); // => [0x12, 0x34]
 * ```
 */
export declare function bnToU8a<ExtToBn extends ToBn>(value?: ExtToBn | BN | bigint | number | null, { bitLength, isLe, isNegative }?: NumberOptions): Uint8Array;

Выполнить команду


Для локальной разработки. Не используйте в интернете!