@drift-labs/sdk 2.74.0-beta.9 → 2.75.0-beta.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/VERSION +1 -1
- package/lib/adminClient.d.ts +14 -3
- package/lib/adminClient.js +309 -119
- package/lib/constants/perpMarkets.js +10 -0
- package/lib/driftClient.js +3 -1
- package/lib/idl/drift.json +89 -1
- package/package.json +1 -1
- package/src/adminClient.ts +590 -209
- package/src/constants/perpMarkets.ts +10 -0
- package/src/driftClient.ts +3 -1
- package/src/idl/drift.json +89 -1
|
@@ -244,6 +244,16 @@ exports.DevnetPerpMarkets = [
|
|
|
244
244
|
launchTs: 1709852537000,
|
|
245
245
|
oracleSource: __1.OracleSource.Prelaunch,
|
|
246
246
|
},
|
|
247
|
+
{
|
|
248
|
+
fullName: 'Kamino',
|
|
249
|
+
category: ['Lending'],
|
|
250
|
+
symbol: 'KMNO-PERP',
|
|
251
|
+
baseAssetSymbol: 'KMNO',
|
|
252
|
+
marketIndex: 24,
|
|
253
|
+
oracle: new web3_js_1.PublicKey('FkAaa46aYdHn8QxxwmiUnJt3th8radB2GFXDMtyLALCY'),
|
|
254
|
+
launchTs: 1711475936000,
|
|
255
|
+
oracleSource: __1.OracleSource.Prelaunch,
|
|
256
|
+
},
|
|
247
257
|
];
|
|
248
258
|
exports.MainnetPerpMarkets = [
|
|
249
259
|
{
|
package/lib/driftClient.js
CHANGED
|
@@ -1673,7 +1673,9 @@ class DriftClient {
|
|
|
1673
1673
|
const ix = await this.program.instruction.settleExpiredMarketPoolsToRevenuePool({
|
|
1674
1674
|
accounts: {
|
|
1675
1675
|
state: await this.getStatePublicKey(),
|
|
1676
|
-
admin: this.
|
|
1676
|
+
admin: this.isSubscribed
|
|
1677
|
+
? this.getStateAccount().admin
|
|
1678
|
+
: this.wallet.publicKey,
|
|
1677
1679
|
spotMarket: spotMarketPublicKey,
|
|
1678
1680
|
perpMarket: perpMarketPublicKey,
|
|
1679
1681
|
},
|
package/lib/idl/drift.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.74.0",
|
|
3
3
|
"name": "drift",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -2651,10 +2651,40 @@
|
|
|
2651
2651
|
"name": "liquidatorFee",
|
|
2652
2652
|
"type": "u32"
|
|
2653
2653
|
},
|
|
2654
|
+
{
|
|
2655
|
+
"name": "ifLiquidationFee",
|
|
2656
|
+
"type": "u32"
|
|
2657
|
+
},
|
|
2654
2658
|
{
|
|
2655
2659
|
"name": "activeStatus",
|
|
2656
2660
|
"type": "bool"
|
|
2657
2661
|
},
|
|
2662
|
+
{
|
|
2663
|
+
"name": "assetTier",
|
|
2664
|
+
"type": {
|
|
2665
|
+
"defined": "AssetTier"
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"name": "scaleInitialAssetWeightStart",
|
|
2670
|
+
"type": "u64"
|
|
2671
|
+
},
|
|
2672
|
+
{
|
|
2673
|
+
"name": "withdrawGuardThreshold",
|
|
2674
|
+
"type": "u64"
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"name": "orderTickSize",
|
|
2678
|
+
"type": "u64"
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
"name": "orderStepSize",
|
|
2682
|
+
"type": "u64"
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
"name": "ifTotalFactor",
|
|
2686
|
+
"type": "u32"
|
|
2687
|
+
},
|
|
2658
2688
|
{
|
|
2659
2689
|
"name": "name",
|
|
2660
2690
|
"type": {
|
|
@@ -2931,6 +2961,12 @@
|
|
|
2931
2961
|
"defined": "OracleSource"
|
|
2932
2962
|
}
|
|
2933
2963
|
},
|
|
2964
|
+
{
|
|
2965
|
+
"name": "contractTier",
|
|
2966
|
+
"type": {
|
|
2967
|
+
"defined": "ContractTier"
|
|
2968
|
+
}
|
|
2969
|
+
},
|
|
2934
2970
|
{
|
|
2935
2971
|
"name": "marginRatioInitial",
|
|
2936
2972
|
"type": "u32"
|
|
@@ -2943,10 +2979,62 @@
|
|
|
2943
2979
|
"name": "liquidatorFee",
|
|
2944
2980
|
"type": "u32"
|
|
2945
2981
|
},
|
|
2982
|
+
{
|
|
2983
|
+
"name": "ifLiquidationFee",
|
|
2984
|
+
"type": "u32"
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
"name": "imfFactor",
|
|
2988
|
+
"type": "u32"
|
|
2989
|
+
},
|
|
2946
2990
|
{
|
|
2947
2991
|
"name": "activeStatus",
|
|
2948
2992
|
"type": "bool"
|
|
2949
2993
|
},
|
|
2994
|
+
{
|
|
2995
|
+
"name": "baseSpread",
|
|
2996
|
+
"type": "u32"
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
"name": "maxSpread",
|
|
3000
|
+
"type": "u32"
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
"name": "maxOpenInterest",
|
|
3004
|
+
"type": "u128"
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"name": "maxRevenueWithdrawPerPeriod",
|
|
3008
|
+
"type": "u64"
|
|
3009
|
+
},
|
|
3010
|
+
{
|
|
3011
|
+
"name": "quoteMaxInsurance",
|
|
3012
|
+
"type": "u64"
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
"name": "orderStepSize",
|
|
3016
|
+
"type": "u64"
|
|
3017
|
+
},
|
|
3018
|
+
{
|
|
3019
|
+
"name": "orderTickSize",
|
|
3020
|
+
"type": "u64"
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
"name": "minOrderSize",
|
|
3024
|
+
"type": "u64"
|
|
3025
|
+
},
|
|
3026
|
+
{
|
|
3027
|
+
"name": "concentrationCoefScale",
|
|
3028
|
+
"type": "u128"
|
|
3029
|
+
},
|
|
3030
|
+
{
|
|
3031
|
+
"name": "curveUpdateIntensity",
|
|
3032
|
+
"type": "u8"
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
"name": "ammJitIntensity",
|
|
3036
|
+
"type": "u8"
|
|
3037
|
+
},
|
|
2950
3038
|
{
|
|
2951
3039
|
"name": "name",
|
|
2952
3040
|
"type": {
|