4

I am trying to use @solana/spl-token(https://www.npmjs.com/package/@solana/spl-token) npm module with the below react implementation and convert it to vanilla js accessing it via CDN(https://www.jsdelivr.com/package/npm/@solana/spl-token) link after importing in HTML.

Unable to access the value of TOKEN_PROGRAM_ID in my vanilla JS code.

React Library usage steps-

Step 1

Able to access here after a successful wallet connection

Step 2


Below is my HTML file-

HTML File

Vanilla JS File- JS File

How can I access the TOKEN_PROGRAM_ID value here after a successful wallet connection?

Any help will be appreciated community.

Thanks

Aman Prakash
  • 340
  • 4
  • 15

0 Answers0