bufferFromHex

Creates a Clarity buffer type from a hex string. Converts the hex string to bytes and wraps it in a BufferCV.


Usage

import { Cl } from '@stacks/transactions';

Cl.bufferFromHex('a1b2c3');

Reference Linkarrow-up-right


Signature

const bufferFromHex: (hex: string) => BufferCV;

Returns

BufferCV

A Clarity buffer value object.


Parameters

hex (required)

  • Type: string

A hex-encoded string (without 0x prefix).

Last updated

Was this helpful?