@solana/web3.js 1.67.0 → 1.67.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/lib/index.cjs.js CHANGED
@@ -183,13 +183,13 @@ class PublicKey extends Struct {
183
183
  this._bn = new BN__default["default"](value);
184
184
  }
185
185
 
186
- if (this._bn.byteLength() > 32) {
186
+ if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {
187
187
  throw new Error(`Invalid public key input`);
188
188
  }
189
189
  }
190
190
  }
191
191
  /**
192
- * Returns a unique PublicKey for tests and benchmarks using acounter
192
+ * Returns a unique PublicKey for tests and benchmarks using a counter
193
193
  */
194
194
 
195
195
 
@@ -296,6 +296,8 @@ class PublicKey extends Struct {
296
296
  /**
297
297
  * Async version of createProgramAddressSync
298
298
  * For backwards compatibility
299
+ *
300
+ * @deprecated Use {@link createProgramAddressSync} instead
299
301
  */
300
302
 
301
303
  /* eslint-disable require-await */
@@ -338,6 +340,8 @@ class PublicKey extends Struct {
338
340
  /**
339
341
  * Async version of findProgramAddressSync
340
342
  * For backwards compatibility
343
+ *
344
+ * @deprecated Use {@link findProgramAddressSync} instead
341
345
  */
342
346
 
343
347
 
@@ -2053,7 +2057,7 @@ class TransactionMessage {
2053
2057
  } = header;
2054
2058
  const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;
2055
2059
  assert(numWritableSignedAccounts > 0, 'Message header is invalid');
2056
- const numWritableUnsignedAccounts = message.staticAccountKeys.length - numReadonlyUnsignedAccounts;
2060
+ const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;
2057
2061
  assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');
2058
2062
  const accountKeys = message.getAccountKeys(args);
2059
2063
  const payerKey = accountKeys.get(0);