The ByteVector is a keyword of the byte array data type.

The maximum size of the variable of the byte array data type is 65,536 bytes.

To assign a byte array to a variable use one of the literals: base16, base58 or base64. The literal name in single quotes is followed by a string in Base16, Base58 or Base64:

let a = base16'52696465'
let b = base58'8t38fWQhrYJsqxXtPpiRCEk1g5RJdq9bG5Rkr2N7mDFC'
let c = base64'UmlkZQ=='

You can convert integer, boolean and string values to a byte array using toBytes function:

let a = 42.toBytes()
let b = true.toBytes()
let c = "Ride".toBytes()

results matching ""

    No results matching ""