Closed emaborsa closed 8 months ago
send
method of the Provider
interface is optional.
You can use AnchorProvider
instead of provider which has the required types for sendAndConfirm
.
Also, I'd remove "@project-serum/anchor": "^0.26.0",
dependency entry as that package is deprecated.
I must confess I am new in web3 but quite familiar with Typescript. I have the following snippet:
At runtime I get
TypeError: provider.send is not a function
. Moving tosendAndConfirm
works. Is the type definition wrong or am I missing something?My
package.json
: