Skip to content

Commit 3796028

Browse files
committed
lukas/gill websocket sub (#1781)
* websockets gill temp * feat: feature parity between gill version ws acct sub and reg one + optional passing into driftClient * fix: post rebase bugs and cleanup * chore: websocket account subscriber export * feat: logging string update on ws acct v2 * rm: useless logging * chore: cleanup ws subscriber v2 docs * chore: specific name on custom ws acct sub param * fix: post rebase again cleanup * fix: prettier fixed
1 parent c093ff9 commit 3796028

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

sdk/src/driftClientConfig.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ export type DriftClientSubscriptionConfig =
8181
commitment?: Commitment
8282
) => WebSocketAccountSubscriberV2<any> | WebSocketAccountSubscriber<any>;
8383
programUserAccountSubscriber?: WebSocketProgramAccountSubscriber<UserAccount>;
84+
perpMarketAccountSubscriber?: new (
85+
accountName: string,
86+
program: Program,
87+
accountPublicKey: PublicKey,
88+
decodeBuffer?: (buffer: Buffer) => any,
89+
resubOpts?: ResubOpts,
90+
commitment?: Commitment
91+
) => WebSocketAccountSubscriberV2<any> | WebSocketAccountSubscriber<any>;
8492
}
8593
| {
8694
type: 'polling';

sdk/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export * from './accounts/webSocketHighLeverageModeConfigAccountSubscriber';
1414
export { WebSocketAccountSubscriberV2 } from './accounts/webSocketAccountSubscriberV2';
1515
export { WebSocketProgramAccountSubscriber } from './accounts/webSocketProgramAccountSubscriber';
1616
export { WebSocketProgramUserAccountSubscriber } from './accounts/websocketProgramUserAccountSubscriber';
17+
export { WebSocketAccountSubscriberV2 } from './accounts/webSocketAccountSubscriberV2';
1718
export * from './accounts/bulkAccountLoader';
1819
export * from './accounts/bulkUserSubscription';
1920
export * from './accounts/bulkUserStatsSubscription';

0 commit comments

Comments
 (0)