@solana/web3.js 1.70.2 → 1.70.3

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.d.ts CHANGED
@@ -2051,6 +2051,12 @@ declare module '@solana/web3.js' {
2051
2051
  abortSignal?: AbortSignal;
2052
2052
  signature: TransactionSignature;
2053
2053
  }>;
2054
+ /**
2055
+ * This type represents all transaction confirmation strategies
2056
+ */
2057
+ type TransactionConfirmationStrategy =
2058
+ | BlockheightBasedTransactionConfirmationStrategy
2059
+ | DurableNonceTransactionConfirmationStrategy;
2054
2060
  /**
2055
2061
  * The level of commitment desired when querying state
2056
2062
  * <pre>
@@ -3496,12 +3502,10 @@ declare module '@solana/web3.js' {
3496
3502
  }>
3497
3503
  >;
3498
3504
  confirmTransaction(
3499
- strategy:
3500
- | BlockheightBasedTransactionConfirmationStrategy
3501
- | DurableNonceTransactionConfirmationStrategy,
3505
+ strategy: TransactionConfirmationStrategy,
3502
3506
  commitment?: Commitment,
3503
3507
  ): Promise<RpcResponseAndContext<SignatureResult>>;
3504
- /** @deprecated Instead, call `confirmTransaction` using a `TransactionConfirmationConfig` */
3508
+ /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
3505
3509
  confirmTransaction(
3506
3510
  strategy: TransactionSignature,
3507
3511
  commitment?: Commitment,
@@ -4360,14 +4364,14 @@ declare module '@solana/web3.js' {
4360
4364
  *
4361
4365
  * @param {Connection} connection
4362
4366
  * @param {Buffer} rawTransaction
4363
- * @param {BlockheightBasedTransactionConfirmationStrategy} confirmationStrategy
4367
+ * @param {TransactionConfirmationStrategy} confirmationStrategy
4364
4368
  * @param {ConfirmOptions} [options]
4365
4369
  * @returns {Promise<TransactionSignature>}
4366
4370
  */
4367
4371
  export function sendAndConfirmRawTransaction(
4368
4372
  connection: Connection,
4369
4373
  rawTransaction: Buffer,
4370
- confirmationStrategy: BlockheightBasedTransactionConfirmationStrategy,
4374
+ confirmationStrategy: TransactionConfirmationStrategy,
4371
4375
  options?: ConfirmOptions,
4372
4376
  ): Promise<TransactionSignature>;
4373
4377
  /**
package/lib/index.esm.js CHANGED
@@ -202,7 +202,8 @@ class PublicKey extends Struct {
202
202
 
203
203
 
204
204
  toBytes() {
205
- return this.toBuffer();
205
+ const buf = this.toBuffer();
206
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
206
207
  }
207
208
  /**
208
209
  * Return the Buffer representation of the public key in big endian
@@ -12709,7 +12710,7 @@ function clusterApiUrl(cluster, tls) {
12709
12710
  *
12710
12711
  * @param {Connection} connection
12711
12712
  * @param {Buffer} rawTransaction
12712
- * @param {BlockheightBasedTransactionConfirmationStrategy} confirmationStrategy
12713
+ * @param {TransactionConfirmationStrategy} confirmationStrategy
12713
12714
  * @param {ConfirmOptions} [options]
12714
12715
  * @returns {Promise<TransactionSignature>}
12715
12716
  */