@solana/web3.js 1.60.0 → 1.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -87,6 +87,24 @@ console.log(solanaWeb3);
87
87
  console.log(solanaWeb3);
88
88
  ```
89
89
 
90
+ ## Compatibility
91
+
92
+ This library requires a JavaScript runtime that supports [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) and the [exponentiation operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation). Both are supported in the following runtimes:
93
+
94
+ - Browsers, by [release date](https://caniuse.com/bigint):
95
+ - Chrome: May 2018
96
+ - Firefox: July 2019
97
+ - Safari: September 2020
98
+ - Mobile Safari: September 2020
99
+ - Edge: January 2020
100
+ - Opera: June 2018
101
+ - Samsung Internet: April 2019
102
+ - Runtimes, [by version](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt):
103
+ - Deno: >=1.0
104
+ - Node: >=10.4.0
105
+ - React Native:
106
+ - \>=0.7.0 using the [Hermes](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) engine ([integration guide](https://solanacookbook.com/integrations/react-native.html#how-to-use-solana-web3-js-in-a-react-native-app)):
107
+
90
108
  ## Flow Support (Discontinued)
91
109
 
92
110
  Flow types are no longer supported in new releases. The last release with Flow support is v1.37.2 and its
@@ -2076,6 +2076,10 @@ class TransactionMessage {
2076
2076
  * Versioned transaction class
2077
2077
  */
2078
2078
  class VersionedTransaction {
2079
+ get version() {
2080
+ return this.message.version;
2081
+ }
2082
+
2079
2083
  constructor(message, signatures) {
2080
2084
  this.signatures = void 0;
2081
2085
  this.message = void 0;
@@ -3500,7 +3504,7 @@ class AddressLookupTableAccount {
3500
3504
  }
3501
3505
 
3502
3506
  isActive() {
3503
- const U64_MAX = 2n ** 64n - 1n;
3507
+ const U64_MAX = 18446744073709551615n;
3504
3508
  return this.state.deactivationSlot === U64_MAX;
3505
3509
  }
3506
3510
 
@@ -6528,7 +6532,7 @@ class Connection {
6528
6532
  */
6529
6533
  // eslint-disable-next-line no-dupe-class-members
6530
6534
  async sendTransaction(transaction, signersOrOptions, options) {
6531
- if ('message' in transaction) {
6535
+ if ('version' in transaction) {
6532
6536
  if (signersOrOptions && Array.isArray(signersOrOptions)) {
6533
6537
  throw new Error('Invalid arguments');
6534
6538
  }
@@ -7891,6 +7895,9 @@ class ComputeBudgetProgram {
7891
7895
  */
7892
7896
 
7893
7897
 
7898
+ /**
7899
+ * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}
7900
+ */
7894
7901
  static requestUnits(params) {
7895
7902
  const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;
7896
7903
  const data = encodeData(type, params);