Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 8156

TokenMetadata not an export? ...just following the code in docs

$
0
0

I am following the Solana docs: "Example: Create a mint with metadata"using Javascript.

Why does an error say that "TokenMetadata" is not an export"?

It also said that this kind of action is only allowed in typescript, which I would rather not use. Is there an option for Javascript and why is it saying "not an export"? I used the entire exact code in the Solana docs and imported all required including from @solana/spl-token-metadata(referring to the code piece below):

 const metadata: TokenMetadata = {    mint: mint.publicKey,    name: 'TOKEN_NAME',    symbol: 'SMBL',    uri: 'URI',    additionalMetadata: [['new-field', 'new-value']],  };

Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>