Skip to content

Commit d8448ac

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 f57f5c9 commit d8448ac

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
@@ -73,6 +73,14 @@ export type DriftClientSubscriptionConfig =
7373
commitment?: Commitment
7474
) => WebSocketAccountSubscriberV2<any> | WebSocketAccountSubscriber<any>;
7575
programUserAccountSubscriber?: WebSocketProgramAccountSubscriber<UserAccount>;
76+
perpMarketAccountSubscriber?: new (
77+
accountName: string,
78+
program: Program,
79+
accountPublicKey: PublicKey,
80+
decodeBuffer?: (buffer: Buffer) => any,
81+
resubOpts?: ResubOpts,
82+
commitment?: Commitment
83+
) => WebSocketAccountSubscriberV2<any> | WebSocketAccountSubscriber<any>;
7684
}
7785
| {
7886
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)