diff --git a/development-powertools/solana-versioned-transactions.md b/development-powertools/solana-versioned-transactions.md index b92fd0e..fd50bb9 100644 --- a/development-powertools/solana-versioned-transactions.md +++ b/development-powertools/solana-versioned-transactions.md @@ -57,7 +57,7 @@ curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d \ ``` -You can also do the same using the [`@solana/web3.js`](https://solana-labs.github.io/solana-web3.js/) library. +You can also do the same using the [`@solana/web3.js`](https://solana-labs.github.io/solana-web3.js/v1.x/) library. ```javascript // connect to the `devnet` cluster and get the current `slot` diff --git a/getting-started-with-solana/establishing-a-connection.md b/getting-started-with-solana/establishing-a-connection.md index 4f96e4b..eca789f 100644 --- a/getting-started-with-solana/establishing-a-connection.md +++ b/getting-started-with-solana/establishing-a-connection.md @@ -136,9 +136,9 @@ useEffect(() => { ## Changing Accounts -Phantom allows users to seamlessly manage multiple accounts (i.e. [Keypairs](https://solana-labs.github.io/solana-web3.js/classes/Keypair.html)) from within a single extension or mobile app. Whenever a user switches accounts, Phantom will emit an `accountChanged` event. +Phantom allows users to seamlessly manage multiple accounts (i.e. [Keypairs](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Keypair.html)) from within a single extension or mobile app. Whenever a user switches accounts, Phantom will emit an `accountChanged` event. -If a user changes accounts while already connected to an application, and the new account had already whitelisted that application, then the user will stay connected and Phantom will pass the [PublicKey](https://solana-labs.github.io/solana-web3.js/classes/PublicKey.html) of the new account: +If a user changes accounts while already connected to an application, and the new account had already whitelisted that application, then the user will stay connected and Phantom will pass the [PublicKey](https://solana-labs.github.io/solana-web3.js/v1.x/classes/PublicKey.html) of the new account: ```javascript provider.on('accountChanged', (publicKey) => { diff --git a/getting-started-with-solana/sending-a-transaction-1.md b/getting-started-with-solana/sending-a-transaction-1.md index 618076b..abfc204 100644 --- a/getting-started-with-solana/sending-a-transaction-1.md +++ b/getting-started-with-solana/sending-a-transaction-1.md @@ -66,7 +66,7 @@ await connection.getSignatureStatus(signature); {% endtab %} {% endtabs %} -You can also specify a `SendOptions` [object](https://solana-labs.github.io/solana-web3.js/modules.html#SendOptions) as a second argument into `signAndSendTransaction()` or as an `options` parameter when using `request`. +You can also specify a `SendOptions` [object](https://solana-labs.github.io/solana-web3.js/v1.x/modules.html#SendOptions) as a second argument into `signAndSendTransaction()` or as an `options` parameter when using `request`. For a live demo of signing and sending a Versioned transaction, please refer to the [`handleSignAndSendTransactionV0()`](https://github.com/phantom-labs/sandbox/blob/78dc35fe140140a961345a6af30a058e1e19a7aa/src/App.tsx#L191) section of our developer sandbox. @@ -76,7 +76,7 @@ Address Lookup Tables (LUTs) can be used to load accounts into table-like data s This lookup method effectively "_compresses_" a 32-byte address into a 1-byte index value. This "_compression_" enables storing up to 256 address in a single lookup table for use inside any given transaction. -With the `@solana/web3.js` [`createLookupTable`](https://solana-labs.github.io/solana-web3.js/classes/AddressLookupTableProgram.html#createLookupTable) function, developers can construct the instruction needed to create a new lookup table, as well as determine its address. Once we have the lookup table instruction, we can construct a transaction, sign it, and send it to create a lookup table on-chain. Address lookup tables can be created with either a `v0` transaction or a `legacy` transaction. However, the Solana runtime can only retrieve and handle the additional addresses within a lookup table while using `v0` transactions. +With the `@solana/web3.js` [`createLookupTable`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/AddressLookupTableProgram.html#createLookupTable) function, developers can construct the instruction needed to create a new lookup table, as well as determine its address. Once we have the lookup table instruction, we can construct a transaction, sign it, and send it to create a lookup table on-chain. Address lookup tables can be created with either a `v0` transaction or a `legacy` transaction. However, the Solana runtime can only retrieve and handle the additional addresses within a lookup table while using `v0` transactions. Here's a code snippet that creates a Lookup Table. @@ -106,7 +106,7 @@ Please refer to the [`handleSignAndSendTransactionV0WithLookupTable()`](https:// ## Extending an Address Lookup Table (LUT) -Once an Address Lookup Table is created, it can then be extended (i.e. accounts can be appended to the table). Using the `@solana/web3.js` library, you can create a new `extend` instruction using the [`extendLookupTable`](https://solana-labs.github.io/solana-web3.js/classes/AddressLookupTableProgram.html#extendLookupTable) method. Once the extend instruction is created, it can be sent in a transaction. +Once an Address Lookup Table is created, it can then be extended (i.e. accounts can be appended to the table). Using the `@solana/web3.js` library, you can create a new `extend` instruction using the [`extendLookupTable`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/AddressLookupTableProgram.html#extendLookupTable) method. Once the extend instruction is created, it can be sent in a transaction. {% tabs %} {% tab title="extendAddressLookupTable()" %} diff --git a/getting-started-with-solana/sending-a-transaction.md b/getting-started-with-solana/sending-a-transaction.md index 56905d2..e49cd5c 100644 --- a/getting-started-with-solana/sending-a-transaction.md +++ b/getting-started-with-solana/sending-a-transaction.md @@ -9,7 +9,7 @@ In order to send a transaction, a web application must: 3. Optionally await network confirmation using a Solana JSON RPC connection. {% hint style="info" %} -For more information about the nature of Solana transactions, please review the [`solana-web3.js` docs](https://solana-labs.github.io/solana-web3.js/) as well as the [Solana Cookbook](https://solanacookbook.com/core-concepts/transactions.html#transactions). +For more information about the nature of Solana transactions, please review the [`solana-web3.js` docs](https://solana-labs.github.io/solana-web3.js/v1.x/) as well as the [Solana Cookbook](https://solanacookbook.com/core-concepts/transactions.html#transactions). {% endhint %} For a sample Phantom transaction, check out our [developer sandbox](https://github.com/phantom-labs/sandbox/blob/b57fdd0e65ce4f01290141a01e33d17fd2f539b9/src/App.tsx#L160). @@ -47,7 +47,7 @@ await connection.getSignatureStatus(signature); {% endtab %} {% endtabs %} -You can also specify a `SendOptions` [object](https://solana-labs.github.io/solana-web3.js/modules.html#SendOptions) as a second argument into `signAndSendTransaction` or as an `options` parameter when using `request`. +You can also specify a `SendOptions` [object](https://solana-labs.github.io/solana-web3.js/v1.x/modules.html#SendOptions) as a second argument into `signAndSendTransaction` or as an `options` parameter when using `request`. For a live demo of `signAndSendTransaction`, please refer to the [`handleSignAndSendTransaction` section of our developer sandbox](https://github.com/phantom-labs/sandbox/blob/b57fdd0e65ce4f01290141a01e33d17fd2f539b9/src/App.tsx#L160). @@ -57,7 +57,7 @@ The following methods are also supported, but are not recommended over `signAndS ### Signing a Transaction (Without Sending) -Once a transaction is created, a web application may ask the user's Phantom wallet to sign the transaction _without_ also submitting it to the network. The easiest and most recommended way of doing this is via the `signTransaction` method on the provider, but it is also possible to do via `request`. In both cases, the call will return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Promise) for the signed transaction. After the transaction has been signed, an application may submit the transaction itself via [web3js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/classes/Connection.html#sendRawTransaction). +Once a transaction is created, a web application may ask the user's Phantom wallet to sign the transaction _without_ also submitting it to the network. The easiest and most recommended way of doing this is via the `signTransaction` method on the provider, but it is also possible to do via `request`. In both cases, the call will return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Promise) for the signed transaction. After the transaction has been signed, an application may submit the transaction itself via [web3js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#sendRawTransaction). {% tabs %} {% tab title="signTransaction()" %} diff --git a/phantom-deeplinks/provider-methods/signalltransactions.md b/phantom-deeplinks/provider-methods/signalltransactions.md index 3e6d450..8deb5d7 100644 --- a/phantom-deeplinks/provider-methods/signalltransactions.md +++ b/phantom-deeplinks/provider-methods/signalltransactions.md @@ -1,6 +1,6 @@ # SignAllTransactions -Once an app is connected, it is also possible to sign multiple transactions at once. Unlike [SignAndSendTransaction](signandsendtransaction.md), Phantom will not submit these transactions to the network. Applications can submit signed transactions using [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/classes/Connection.html#sendRawTransaction). +Once an app is connected, it is also possible to sign multiple transactions at once. Unlike [SignAndSendTransaction](signandsendtransaction.md), Phantom will not submit these transactions to the network. Applications can submit signed transactions using [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#sendRawTransaction). ### Base URL @@ -25,7 +25,7 @@ https://phantom.app/ul/v1/signAllTransactions } ``` - * `transactions` **(required)**: An array of [transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) that Phantom will sign, serialized and encoded in base58. + * `transactions` **(required)**: An array of [transactions](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Transaction.html) that Phantom will sign, serialized and encoded in base58. * `session` **(required)**: The session token received from the [Connect](connect.md) method. Please see [Handling Sessions](../handling-sessions.md) for more details. ### Returns @@ -45,7 +45,7 @@ https://phantom.app/ul/v1/signAllTransactions } ``` - * `transactions`: An array of signed, serialized transactions that are base58 encoded. Phantom will not submit these transactions. Applications can submit these transactions themselves via [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/classes/Connection.html#sendRawTransaction). + * `transactions`: An array of signed, serialized transactions that are base58 encoded. Phantom will not submit these transactions. Applications can submit these transactions themselves via [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#sendRawTransaction). #### :x:Reject diff --git a/phantom-deeplinks/provider-methods/signandsendtransaction.md b/phantom-deeplinks/provider-methods/signandsendtransaction.md index e54ab82..a7134e8 100644 --- a/phantom-deeplinks/provider-methods/signandsendtransaction.md +++ b/phantom-deeplinks/provider-methods/signandsendtransaction.md @@ -9,7 +9,7 @@ In order to send a transaction, an application must: 3. Optionally await network confirmation using a Solana JSON RPC connection. {% hint style="info" %} -For more information about the nature of Solana transactions, please review the [`solana-web3.js` docs](https://solana-labs.github.io/solana-web3.js/) as well as the [Solana Cookbook](https://solanacookbook.com/core-concepts/transactions.html#transactions). +For more information about the nature of Solana transactions, please review the [`solana-web3.js` docs](https://solana-labs.github.io/solana-web3.js/v1.x/) as well as the [Solana Cookbook](https://solanacookbook.com/core-concepts/transactions.html#transactions). {% endhint %} For a sample transaction using Phantom deeplinks, check out our [deeplinking demo app](../../resources/sandbox.md#deeplinking-demo-app). @@ -35,8 +35,8 @@ https://phantom.app/ul/v1/signAndSendTransaction } ``` - * `transaction` **(required)**: The [transaction](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) that Phantom will sign and submit, serialized and encoded in base58. - * `sendOptions` (optional): An optional object that specifies options for how Phantom should submit the transaction. This object is [defined in Solana web3.js](https://solana-labs.github.io/solana-web3.js/modules.html#SendOptions). + * `transaction` **(required)**: The [transaction](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Transaction.html) that Phantom will sign and submit, serialized and encoded in base58. + * `sendOptions` (optional): An optional object that specifies options for how Phantom should submit the transaction. This object is [defined in Solana web3.js](https://solana-labs.github.io/solana-web3.js/v1.x/modules.html#SendOptions). * `session` **(required)**: The session token received from the [Connect](connect.md) method. Please see [Handling Sessions](../handling-sessions.md) for more details. ### Returns diff --git a/phantom-deeplinks/provider-methods/signtransaction.md b/phantom-deeplinks/provider-methods/signtransaction.md index 0c6dee8..e200463 100644 --- a/phantom-deeplinks/provider-methods/signtransaction.md +++ b/phantom-deeplinks/provider-methods/signtransaction.md @@ -2,7 +2,7 @@ The **easiest** and **most recommended** way to send a transaction is via [SignAndSendTransaction](signandsendtransaction.md). It is safer for users, and a simpler API for developers, for Phantom to submit the transaction immediately after signing it instead of relying on the application to do so. -However, it is also possible for an app to request just the signature from Phantom. Once signed, an app can submit the transaction itself using [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/classes/Connection.html#sendRawTransaction). +However, it is also possible for an app to request just the signature from Phantom. Once signed, an app can submit the transaction itself using [web3.js's `sendRawTransaction`](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#sendRawTransaction). ### Base URL @@ -24,7 +24,7 @@ https://phantom.app/ul/v1/signTransaction } ``` - * `transaction` **(required)**: The [transaction](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) that Phantom will sign, serialized and encoded in base58. + * `transaction` **(required)**: The [transaction](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Transaction.html) that Phantom will sign, serialized and encoded in base58. * `session` **(required)**: The session token received from the [Connect](connect.md) method. Please see [Handling Sessions](../handling-sessions.md) for more details. ### Returns @@ -41,7 +41,7 @@ https://phantom.app/ul/v1/signTransaction } ``` - * `transaction`: The signed, serialized transaction that is base58 encoded. Phantom will not submit this transactions. An application can submit this transactions itself via [web3.js's sendRawTransaction](https://solana-labs.github.io/solana-web3.js/classes/Connection.html#sendRawTransaction). + * `transaction`: The signed, serialized transaction that is base58 encoded. Phantom will not submit this transactions. An application can submit this transactions itself via [web3.js's sendRawTransaction](https://solana-labs.github.io/solana-web3.js/v1.x/classes/Connection.html#sendRawTransaction). #### :x:Reject