@drift-labs/sdk 2.54.0-beta.0 → 2.54.0-beta.10
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/accounts/pollingInsuranceFundStakeAccountSubscriber.js +0 -1
- package/lib/constants/perpMarkets.js +20 -0
- package/lib/driftClient.d.ts +8 -2
- package/lib/driftClient.js +95 -20
- package/lib/events/webSocketLogProvider.js +3 -0
- package/lib/idl/drift.json +7 -1
- package/lib/jupiter/jupiterClient.d.ts +6 -0
- package/lib/jupiter/jupiterClient.js +2 -2
- package/lib/math/funding.js +24 -1
- package/lib/math/oracles.js +2 -2
- package/lib/math/superStake.d.ts +51 -0
- package/lib/math/superStake.js +10 -2
- package/lib/priorityFee/averageOverSlotsStrategy.d.ts +0 -5
- package/lib/priorityFee/averageOverSlotsStrategy.js +1 -13
- package/lib/priorityFee/maxOverSlotsStrategy.d.ts +0 -5
- package/lib/priorityFee/maxOverSlotsStrategy.js +1 -13
- package/lib/priorityFee/priorityFeeSubscriber.d.ts +5 -4
- package/lib/priorityFee/priorityFeeSubscriber.js +15 -21
- package/lib/tx/baseTxSender.d.ts +6 -2
- package/lib/tx/baseTxSender.js +47 -2
- package/lib/tx/fastSingleTxSender.d.ts +3 -2
- package/lib/tx/fastSingleTxSender.js +10 -2
- package/lib/tx/retryTxSender.d.ts +3 -2
- package/lib/tx/retryTxSender.js +14 -23
- package/lib/tx/types.d.ts +5 -0
- package/lib/tx/types.js +7 -0
- package/lib/tx/utils.d.ts +5 -1
- package/lib/tx/utils.js +20 -1
- package/lib/userMap/userMap.js +4 -0
- package/package.json +1 -1
- package/src/accounts/pollingInsuranceFundStakeAccountSubscriber.ts +0 -1
- package/src/constants/perpMarkets.ts +20 -0
- package/src/driftClient.ts +197 -39
- package/src/events/webSocketLogProvider.ts +11 -2
- package/src/idl/drift.json +7 -1
- package/src/jupiter/jupiterClient.ts +8 -2
- package/src/math/funding.ts +28 -1
- package/src/math/oracles.ts +2 -2
- package/src/math/superStake.ts +60 -1
- package/src/priorityFee/averageOverSlotsStrategy.ts +1 -16
- package/src/priorityFee/maxOverSlotsStrategy.ts +1 -16
- package/src/priorityFee/priorityFeeSubscriber.ts +22 -26
- package/src/tx/baseTxSender.ts +64 -2
- package/src/tx/fastSingleTxSender.ts +11 -2
- package/src/tx/retryTxSender.ts +16 -25
- package/src/tx/types.ts +6 -0
- package/src/tx/utils.ts +32 -0
- package/src/userMap/userMap.ts +3 -0
- package/tests/amm/test.ts +275 -2
- package/tests/dlob/test.ts +2 -2
- package/tests/tx/priorityFeeStrategy.ts +2 -2
|
@@ -66,7 +66,7 @@ describe('PriorityFeeStrategy', () => {
|
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
it('MaxOverSlotsStrategy should calculate the max prioritization fee over slots', () => {
|
|
69
|
-
const maxOverSlotsStrategy = new MaxOverSlotsStrategy(
|
|
69
|
+
const maxOverSlotsStrategy = new MaxOverSlotsStrategy();
|
|
70
70
|
const samples = [
|
|
71
71
|
{ slot: 6, prioritizationFee: 432 },
|
|
72
72
|
{ slot: 3, prioritizationFee: 543 },
|
|
@@ -80,7 +80,7 @@ describe('PriorityFeeStrategy', () => {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
it('AverageOverSlotsStrategy should calculate the average prioritization fee over slots', () => {
|
|
83
|
-
const averageOverSlotsStrategy = new AverageOverSlotsStrategy(
|
|
83
|
+
const averageOverSlotsStrategy = new AverageOverSlotsStrategy();
|
|
84
84
|
const samples = [
|
|
85
85
|
{ slot: 6, prioritizationFee: 432 },
|
|
86
86
|
{ slot: 3, prioritizationFee: 543 },
|