The underlying connection to a fullnode JSON RPC endpoint
true
if the wallet was connected via {@link PhantomWalletMock#connect}
Public key of the currently used wallet.
{@link Signer} of the currently used wallet.
Default commitment used for transactions.
Connection URL used for the underlying connection.
Secret key of the currently used wallet.
All transactions signatures made since wallet was created ordered oldest to most recent.
Connects the wallet to the URL provided on wallet creation. This needs to be called before attempting to sign messages or transactions.
emits 'connect'
Disconnects the wallet.
emits 'disconnect'
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Add a one-time listener for a given event.
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Signs all transactions using the current wallet.
Signs the message using the current wallet.
Signs the transaction using the current wallet.
Creates a {@see PhantomWalletMock} instance with the provided info.
cluster to connect to, i.e. https://api.devnet.solana.com
or http://127.0.0.1:8899
the private and public key of the wallet to use, i.e. the payer/signer
passed to the {@link * https://solana-labs.github.io/solana-web3.js/classes/Connection.html#constructor } when creating a connection to the cluster
Changes the Wallet to the provided keypair This updates the signer as well.
Fetch the balance for the wallet's account.
Fetch the balance in Sol for the wallet's account.
Fetches transaction details for the last confirmed transaction signed with this wallet.
Fetches transaction details for the last confirmed transaction signed with this wallet and returns its summary that can be used to log it to the console.
Fetches transaction details for the last confirmed transaction signed with this wallet and returns its summary.
Drops sol to the currently connected wallet.
Generated using TypeDoc
Standin for the the [https://phantom.app/ | phantom wallet] to use while testing. Behaves as much as possible as the original which is why care needs to be taken when using it.
The main difference is that no user confirmation is required to approve a transaction or signature.
This means that user approval is automatic!