Skip to main content
Module

x/clarinet/index.ts>types.buff

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
Latest
function types.buff
import { types } from "https://deno.land/x/clarinet@v1.8.0/index.ts";
const { buff } = types;

Transforms an Uint8Array into a Clarity buffer value

Examples

types.buff(Uint8Array.from([98, 116, 99]) // returns "0x627463"

Parameters

val: Uint8Array

Returns

string

Transforms an Uint8Array into a Clarity buffer value

Examples

types.buff(Uint8Array.from([98, 116, 99]) // returns "0x627463"

Parameters

val: ArrayBuffer

Returns

string

Transforms an Uint8Array into a Clarity buffer value

Examples

types.buff(Uint8Array.from([98, 116, 99]) // returns "0x627463"

Parameters

val: string

Returns

string