Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 75
5 votes

How do I use spl-token through cdn.jsdelivr.net?

@solana/spl-token does not export a global like @solana/web3.js does. It's an ES/CommonJS module intended to be bundled with your app. Nominally, you could use an ES Module import like this: <script t …
steveluscher's user avatar
  • 3,153
3 votes

sendAndConfirmTransaction returns Cannot read properties of undefined (reading 'toString')

Presuming that useWallet() is from @solana/wallet-adapter, its return value is not a Signer. The return value of useWallet is a WalletContextState. WalletContextState does not expose the private key y …
steveluscher's user avatar
  • 3,153
2 votes
Accepted

Just using the Browser bundle, how can I send a transaction (ReferenceError: Buffer is not d...

Buffer is available in Node.js runtimes, but not in browsers. Without knowing the exact shape of your build system I can only give general advice, which is that you'll need to install a Buffer polyfil …
steveluscher's user avatar
  • 3,153
1 vote

(SPL-Token) Solana Create Token Account with Wallet Adapter | React, JS

The return type of getMint is a Mint. The third parameter of getOrCreateAssociatedTokenAccount is a PublicKey. Change your invocation to this: const mint = await getMint(connection, tokenContract); co …
steveluscher's user avatar
  • 3,153