@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
|
@@ -254,6 +254,16 @@ export const DevnetPerpMarkets: PerpMarketConfig[] = [
|
|
|
254
254
|
launchTs: 1709852537000,
|
|
255
255
|
oracleSource: OracleSource.Prelaunch,
|
|
256
256
|
},
|
|
257
|
+
{
|
|
258
|
+
fullName: 'Kamino',
|
|
259
|
+
category: ['Lending'],
|
|
260
|
+
symbol: 'KMNO-PERP',
|
|
261
|
+
baseAssetSymbol: 'KMNO',
|
|
262
|
+
marketIndex: 24,
|
|
263
|
+
oracle: new PublicKey('FkAaa46aYdHn8QxxwmiUnJt3th8radB2GFXDMtyLALCY'),
|
|
264
|
+
launchTs: 1711475936000,
|
|
265
|
+
oracleSource: OracleSource.Prelaunch,
|
|
266
|
+
},
|
|
257
267
|
];
|
|
258
268
|
|
|
259
269
|
export const MainnetPerpMarkets: PerpMarketConfig[] = [
|
package/src/driftClient.ts
CHANGED
|
@@ -3029,7 +3029,9 @@ export class DriftClient {
|
|
|
3029
3029
|
await this.program.instruction.settleExpiredMarketPoolsToRevenuePool({
|
|
3030
3030
|
accounts: {
|
|
3031
3031
|
state: await this.getStatePublicKey(),
|
|
3032
|
-
admin: this.
|
|
3032
|
+
admin: this.isSubscribed
|
|
3033
|
+
? this.getStateAccount().admin
|
|
3034
|
+
: this.wallet.publicKey,
|
|
3033
3035
|
spotMarket: spotMarketPublicKey,
|
|
3034
3036
|
perpMarket: perpMarketPublicKey,
|
|
3035
3037
|
},
|
package/src/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": {
|