@drift-labs/sdk 2.54.0-beta.8 → 2.55.0-beta.0
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.55.0-beta.0
|
package/lib/idl/drift.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.54.0",
|
|
3
3
|
"name": "drift",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -8524,7 +8524,13 @@
|
|
|
8524
8524
|
"kind": "enum",
|
|
8525
8525
|
"variants": [
|
|
8526
8526
|
{
|
|
8527
|
-
"name": "Standard"
|
|
8527
|
+
"name": "Standard",
|
|
8528
|
+
"fields": [
|
|
8529
|
+
{
|
|
8530
|
+
"name": "track_open_orders_fraction",
|
|
8531
|
+
"type": "bool"
|
|
8532
|
+
}
|
|
8533
|
+
]
|
|
8528
8534
|
},
|
|
8529
8535
|
{
|
|
8530
8536
|
"name": "Liquidation",
|
package/package.json
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { LogProvider, logProviderCallback } from './types';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Commitment,
|
|
4
|
+
Connection,
|
|
5
|
+
Context,
|
|
6
|
+
Logs,
|
|
7
|
+
PublicKey,
|
|
8
|
+
} from '@solana/web3.js';
|
|
3
9
|
import { EventEmitter } from 'events';
|
|
4
10
|
|
|
5
11
|
export class WebSocketLogProvider implements LogProvider {
|
|
@@ -45,7 +51,7 @@ export class WebSocketLogProvider implements LogProvider {
|
|
|
45
51
|
public setSubscription(callback: logProviderCallback): void {
|
|
46
52
|
this.subscriptionId = this.connection.onLogs(
|
|
47
53
|
this.address,
|
|
48
|
-
(logs, ctx) => {
|
|
54
|
+
(logs: Logs, ctx: Context) => {
|
|
49
55
|
if (this.resubTimeoutMs && !this.isUnsubscribing) {
|
|
50
56
|
this.receivingData = true;
|
|
51
57
|
clearTimeout(this.timeoutId);
|
|
@@ -55,6 +61,9 @@ export class WebSocketLogProvider implements LogProvider {
|
|
|
55
61
|
}
|
|
56
62
|
this.reconnectAttempts = 0;
|
|
57
63
|
}
|
|
64
|
+
if (logs.err !== null) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
58
67
|
callback(logs.signature, ctx.slot, logs.logs, undefined);
|
|
59
68
|
},
|
|
60
69
|
this.commitment
|
package/src/idl/drift.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.54.0",
|
|
3
3
|
"name": "drift",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -8524,7 +8524,13 @@
|
|
|
8524
8524
|
"kind": "enum",
|
|
8525
8525
|
"variants": [
|
|
8526
8526
|
{
|
|
8527
|
-
"name": "Standard"
|
|
8527
|
+
"name": "Standard",
|
|
8528
|
+
"fields": [
|
|
8529
|
+
{
|
|
8530
|
+
"name": "track_open_orders_fraction",
|
|
8531
|
+
"type": "bool"
|
|
8532
|
+
}
|
|
8533
|
+
]
|
|
8528
8534
|
},
|
|
8529
8535
|
{
|
|
8530
8536
|
"name": "Liquidation",
|