'How to use @solana/spl-token in vanilla JS after importing in HTML using CDN?
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-
Able to access here after a successful wallet connection
Below is my HTML file-
How can I access the TOKEN_PROGRAM_ID value here after a successful wallet connection?
Any help will be appreciated community.
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|




