@drift-labs/sdk 2.97.0-beta.20 → 2.97.0-beta.22
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/addresses/pda.d.ts +1 -0
- package/lib/addresses/pda.js +8 -1
- package/lib/driftClient.d.ts +12 -5
- package/lib/driftClient.js +109 -19
- package/lib/idl/drift.json +275 -3
- package/lib/types.d.ts +25 -1
- package/lib/types.js +6 -1
- package/package.json +2 -1
- package/src/addresses/pda.ts +13 -0
- package/src/driftClient.ts +174 -24
- package/src/idl/drift.json +275 -3
- package/src/types.ts +29 -1
package/src/types.ts
CHANGED
|
@@ -914,7 +914,7 @@ export type UserStatsAccount = {
|
|
|
914
914
|
current_epoch_referrer_reward: BN;
|
|
915
915
|
};
|
|
916
916
|
referrer: PublicKey;
|
|
917
|
-
|
|
917
|
+
referrerStatus: boolean;
|
|
918
918
|
authority: PublicKey;
|
|
919
919
|
ifStakedQuoteAssetAmount: BN;
|
|
920
920
|
|
|
@@ -1083,6 +1083,29 @@ export type SwiftTriggerOrderParams = {
|
|
|
1083
1083
|
baseAssetAmount: BN;
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
1086
|
+
export type RFQMakerOrderParams = {
|
|
1087
|
+
uuid: Uint8Array; // From buffer of standard UUID string
|
|
1088
|
+
authority: PublicKey;
|
|
1089
|
+
subAccountId: number;
|
|
1090
|
+
marketIndex: number;
|
|
1091
|
+
marketType: MarketType;
|
|
1092
|
+
baseAssetAmount: BN;
|
|
1093
|
+
price: BN;
|
|
1094
|
+
direction: PositionDirection;
|
|
1095
|
+
maxTs: BN;
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
export type RFQMakerMessage = {
|
|
1099
|
+
orderParams: RFQMakerOrderParams;
|
|
1100
|
+
signature: Uint8Array;
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
export type RFQMatch = {
|
|
1104
|
+
baseAssetAmount: BN;
|
|
1105
|
+
makerOrderParams: RFQMakerOrderParams;
|
|
1106
|
+
makerSignature: Uint8Array;
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1086
1109
|
export type MakerInfo = {
|
|
1087
1110
|
maker: PublicKey;
|
|
1088
1111
|
makerStats: PublicKey;
|
|
@@ -1102,6 +1125,11 @@ export type ReferrerInfo = {
|
|
|
1102
1125
|
referrerStats: PublicKey;
|
|
1103
1126
|
};
|
|
1104
1127
|
|
|
1128
|
+
export enum ReferrerStatus {
|
|
1129
|
+
IsReferrer = 1,
|
|
1130
|
+
IsReferred = 2,
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1105
1133
|
export enum PlaceAndTakeOrderSuccessCondition {
|
|
1106
1134
|
PartialFill = 1,
|
|
1107
1135
|
FullFill = 2,
|