I'm building a miniature next react app (for test purpose) to test a js script that i made, that is supposed to mint NFT on my account. I'm following this to makes everything works. But, when i try any of these two:
const connection = new Connection(
clusterApiUrl('devnet'),
);
const connection = new Connection(
"http://127.0.0.1:8899",
);
then i get an error in createMint function:
let mint = await createMint(
connection,
mintRequester, // payer
mintRequester.publicKey, // mint
null, // freeze
0,
);
the error is:
Unhandled Runtime Error
TypeError: unexpected type, use Uint8Array
Source
scripts/mint.ts (48:4) @ async*_callee$
46 |
47 | let mint = await createMint(
> 48 | connection,
| ^
49 | mintRequester, // payer
50 | mintRequester.publicKey, // mint
51 | null, // freeze
note: testnet
timeout, cant use it