@drift-labs/sdk 2.97.0-beta.23 → 2.97.0-beta.24
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/VERSION +1 -1
- package/lib/browser/driftClient.d.ts +9 -0
- package/lib/browser/driftClient.js +11 -2
- package/lib/node/driftClient.d.ts +9 -0
- package/lib/node/driftClient.js +11 -2
- package/package.json +1 -1
- package/src/driftClient.ts +11 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.97.0-beta.
|
|
1
|
+
2.97.0-beta.24
|
|
@@ -805,6 +805,15 @@ export declare class DriftClient {
|
|
|
805
805
|
private handleSignedTransaction;
|
|
806
806
|
private handlePreSignedTransaction;
|
|
807
807
|
private isVersionedTransaction;
|
|
808
|
+
/**
|
|
809
|
+
* Send a transaction.
|
|
810
|
+
*
|
|
811
|
+
* @param tx
|
|
812
|
+
* @param additionalSigners
|
|
813
|
+
* @param opts :: Will fallback to DriftClient's opts if not provided
|
|
814
|
+
* @param preSigned
|
|
815
|
+
* @returns
|
|
816
|
+
*/
|
|
808
817
|
sendTransaction(tx: Transaction | VersionedTransaction, additionalSigners?: Array<Signer>, opts?: ConfirmOptions, preSigned?: boolean): Promise<TxSigAndSlot>;
|
|
809
818
|
buildTransaction(instructions: TransactionInstruction | TransactionInstruction[], txParams?: TxParams, txVersion?: TransactionVersion, lookupTables?: AddressLookupTableAccount[], forceVersionedTransaction?: boolean, recentBlockhash?: BlockhashWithExpiryBlockHeight): Promise<Transaction | VersionedTransaction>;
|
|
810
819
|
buildBulkTransactions(instructions: (TransactionInstruction | TransactionInstruction[])[], txParams?: TxParams, txVersion?: TransactionVersion, lookupTables?: AddressLookupTableAccount[], forceVersionedTransaction?: boolean): Promise<(Transaction | VersionedTransaction)[]>;
|
|
@@ -4425,13 +4425,22 @@ class DriftClient {
|
|
|
4425
4425
|
isVersionedTransaction(tx) {
|
|
4426
4426
|
return (0, utils_2.isVersionedTransaction)(tx);
|
|
4427
4427
|
}
|
|
4428
|
+
/**
|
|
4429
|
+
* Send a transaction.
|
|
4430
|
+
*
|
|
4431
|
+
* @param tx
|
|
4432
|
+
* @param additionalSigners
|
|
4433
|
+
* @param opts :: Will fallback to DriftClient's opts if not provided
|
|
4434
|
+
* @param preSigned
|
|
4435
|
+
* @returns
|
|
4436
|
+
*/
|
|
4428
4437
|
sendTransaction(tx, additionalSigners, opts, preSigned) {
|
|
4429
4438
|
const isVersionedTx = this.isVersionedTransaction(tx);
|
|
4430
4439
|
if (isVersionedTx) {
|
|
4431
|
-
return this.txSender.sendVersionedTransaction(tx, additionalSigners, opts, preSigned);
|
|
4440
|
+
return this.txSender.sendVersionedTransaction(tx, additionalSigners, opts !== null && opts !== void 0 ? opts : this.opts, preSigned);
|
|
4432
4441
|
}
|
|
4433
4442
|
else {
|
|
4434
|
-
return this.txSender.send(tx, additionalSigners, opts, preSigned);
|
|
4443
|
+
return this.txSender.send(tx, additionalSigners, opts !== null && opts !== void 0 ? opts : this.opts, preSigned);
|
|
4435
4444
|
}
|
|
4436
4445
|
}
|
|
4437
4446
|
async buildTransaction(instructions, txParams, txVersion, lookupTables, forceVersionedTransaction, recentBlockhash) {
|
|
@@ -805,6 +805,15 @@ export declare class DriftClient {
|
|
|
805
805
|
private handleSignedTransaction;
|
|
806
806
|
private handlePreSignedTransaction;
|
|
807
807
|
private isVersionedTransaction;
|
|
808
|
+
/**
|
|
809
|
+
* Send a transaction.
|
|
810
|
+
*
|
|
811
|
+
* @param tx
|
|
812
|
+
* @param additionalSigners
|
|
813
|
+
* @param opts :: Will fallback to DriftClient's opts if not provided
|
|
814
|
+
* @param preSigned
|
|
815
|
+
* @returns
|
|
816
|
+
*/
|
|
808
817
|
sendTransaction(tx: Transaction | VersionedTransaction, additionalSigners?: Array<Signer>, opts?: ConfirmOptions, preSigned?: boolean): Promise<TxSigAndSlot>;
|
|
809
818
|
buildTransaction(instructions: TransactionInstruction | TransactionInstruction[], txParams?: TxParams, txVersion?: TransactionVersion, lookupTables?: AddressLookupTableAccount[], forceVersionedTransaction?: boolean, recentBlockhash?: BlockhashWithExpiryBlockHeight): Promise<Transaction | VersionedTransaction>;
|
|
810
819
|
buildBulkTransactions(instructions: (TransactionInstruction | TransactionInstruction[])[], txParams?: TxParams, txVersion?: TransactionVersion, lookupTables?: AddressLookupTableAccount[], forceVersionedTransaction?: boolean): Promise<(Transaction | VersionedTransaction)[]>;
|
package/lib/node/driftClient.js
CHANGED
|
@@ -4425,13 +4425,22 @@ class DriftClient {
|
|
|
4425
4425
|
isVersionedTransaction(tx) {
|
|
4426
4426
|
return (0, utils_2.isVersionedTransaction)(tx);
|
|
4427
4427
|
}
|
|
4428
|
+
/**
|
|
4429
|
+
* Send a transaction.
|
|
4430
|
+
*
|
|
4431
|
+
* @param tx
|
|
4432
|
+
* @param additionalSigners
|
|
4433
|
+
* @param opts :: Will fallback to DriftClient's opts if not provided
|
|
4434
|
+
* @param preSigned
|
|
4435
|
+
* @returns
|
|
4436
|
+
*/
|
|
4428
4437
|
sendTransaction(tx, additionalSigners, opts, preSigned) {
|
|
4429
4438
|
const isVersionedTx = this.isVersionedTransaction(tx);
|
|
4430
4439
|
if (isVersionedTx) {
|
|
4431
|
-
return this.txSender.sendVersionedTransaction(tx, additionalSigners, opts, preSigned);
|
|
4440
|
+
return this.txSender.sendVersionedTransaction(tx, additionalSigners, opts !== null && opts !== void 0 ? opts : this.opts, preSigned);
|
|
4432
4441
|
}
|
|
4433
4442
|
else {
|
|
4434
|
-
return this.txSender.send(tx, additionalSigners, opts, preSigned);
|
|
4443
|
+
return this.txSender.send(tx, additionalSigners, opts !== null && opts !== void 0 ? opts : this.opts, preSigned);
|
|
4435
4444
|
}
|
|
4436
4445
|
}
|
|
4437
4446
|
async buildTransaction(instructions, txParams, txVersion, lookupTables, forceVersionedTransaction, recentBlockhash) {
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -8393,6 +8393,15 @@ export class DriftClient {
|
|
|
8393
8393
|
return isVersionedTransaction(tx);
|
|
8394
8394
|
}
|
|
8395
8395
|
|
|
8396
|
+
/**
|
|
8397
|
+
* Send a transaction.
|
|
8398
|
+
*
|
|
8399
|
+
* @param tx
|
|
8400
|
+
* @param additionalSigners
|
|
8401
|
+
* @param opts :: Will fallback to DriftClient's opts if not provided
|
|
8402
|
+
* @param preSigned
|
|
8403
|
+
* @returns
|
|
8404
|
+
*/
|
|
8396
8405
|
sendTransaction(
|
|
8397
8406
|
tx: Transaction | VersionedTransaction,
|
|
8398
8407
|
additionalSigners?: Array<Signer>,
|
|
@@ -8405,14 +8414,14 @@ export class DriftClient {
|
|
|
8405
8414
|
return this.txSender.sendVersionedTransaction(
|
|
8406
8415
|
tx as VersionedTransaction,
|
|
8407
8416
|
additionalSigners,
|
|
8408
|
-
opts,
|
|
8417
|
+
opts ?? this.opts,
|
|
8409
8418
|
preSigned
|
|
8410
8419
|
);
|
|
8411
8420
|
} else {
|
|
8412
8421
|
return this.txSender.send(
|
|
8413
8422
|
tx as Transaction,
|
|
8414
8423
|
additionalSigners,
|
|
8415
|
-
opts,
|
|
8424
|
+
opts ?? this.opts,
|
|
8416
8425
|
preSigned
|
|
8417
8426
|
);
|
|
8418
8427
|
}
|