Skip to content
Uint8Array error - not valid datatype (but runs fine in debugger)
Profile icon

The replit is here:

Blows up on line 149 when I run it (error: metadata should be uint8array or string). When I debug it, it works. When I run it locally it works too. Please advise as I am sure this error is on replit end.

let metadatafile = {
"name": "ALICECOI",
"description": "Alice's Artwork Coins",
"image": "",
"image_integrity": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
"properties": {
"simple_property": "Alice's first artwork",
"rich_property": {
"name": "AliceCoi",
"value": "001",
"display_value": "001",
"class": "emphasis",
"css": {
"color": "#ffffff",
"font-weight": "bold",
"text-decoration": "underline"
"array_property": {
"name": "Artwork Coins",
"value": [1, 2, 3, 4],
"class": "emphasis"
const hash = crypto.createHash('sha256');
const metadata = new Uint8Array(hash.digest());
// blows up on next line
let txn = algosdk.makeAssetCreateTxnWithSuggestedParams(addr, note,
totalIssuance, decimals, defaultFrozen, manager, reserve, freeze,
clawback, unitName, assetName, assetURL, metadata, params);

You are viewing a single comment. View All
Profile icon