Converts a Uint8Array to a BufferCV clarity type
returns instance of type BufferCV
import { bufferCV } from '@stacks/transactions'; const buffer = utf8ToBytes('this is a test'); const buf = bufferCV(buffer); // { type: 2, buffer: <Uint8Array 74 68 69 73 20 69 73 20 61 20 74 65 73 74> } const value = bytesToUtf8(buf.buffer); // this is a test
clarity test cases for more examples
value to be converted to clarity type
Generated using TypeDoc
Converts a Uint8Array to a BufferCV clarity type
Returns
returns instance of type BufferCV
Example
See
clarity test cases for more examples