@drift-labs/sdk 2.113.0-beta.2 → 2.113.0-beta.4
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/browser/accounts/grpcAccountSubscriber.js +2 -1
- package/lib/browser/accounts/grpcProgramAccountSubscriber.js +2 -1
- package/lib/browser/jupiter/jupiterClient.js +1 -1
- package/lib/browser/types.d.ts +1 -1
- package/lib/node/accounts/grpcAccountSubscriber.js +2 -1
- package/lib/node/accounts/grpcProgramAccountSubscriber.js +2 -1
- package/lib/node/jupiter/jupiterClient.js +1 -1
- package/lib/node/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/accounts/grpcAccountSubscriber.ts +2 -1
- package/src/accounts/grpcProgramAccountSubscriber.ts +2 -1
- package/src/jupiter/jupiterClient.ts +1 -1
- package/src/types.ts +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.113.0-beta.
|
|
1
|
+
2.113.0-beta.4
|
|
@@ -51,7 +51,8 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
|
|
|
51
51
|
await this.fetch();
|
|
52
52
|
}
|
|
53
53
|
// Subscribe with grpc
|
|
54
|
-
this.stream =
|
|
54
|
+
this.stream =
|
|
55
|
+
(await this.client.subscribe());
|
|
55
56
|
const request = {
|
|
56
57
|
slots: {},
|
|
57
58
|
accounts: {
|
|
@@ -56,7 +56,8 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
|
|
|
56
56
|
}
|
|
57
57
|
this.onChange = onChange;
|
|
58
58
|
// Subscribe with grpc
|
|
59
|
-
this.stream =
|
|
59
|
+
this.stream =
|
|
60
|
+
(await this.client.subscribe());
|
|
60
61
|
const filters = this.options.filters.map((filter) => {
|
|
61
62
|
return {
|
|
62
63
|
memcmp: {
|
|
@@ -92,7 +92,7 @@ class JupiterClient {
|
|
|
92
92
|
}),
|
|
93
93
|
})).json();
|
|
94
94
|
if (!('swapTransaction' in resp)) {
|
|
95
|
-
throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${
|
|
95
|
+
throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${', ' + ((_a = resp.message) !== null && _a !== void 0 ? _a : '')}`);
|
|
96
96
|
}
|
|
97
97
|
const { swapTransaction } = resp;
|
|
98
98
|
try {
|
package/lib/browser/types.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
|
|
|
51
51
|
await this.fetch();
|
|
52
52
|
}
|
|
53
53
|
// Subscribe with grpc
|
|
54
|
-
this.stream =
|
|
54
|
+
this.stream =
|
|
55
|
+
(await this.client.subscribe());
|
|
55
56
|
const request = {
|
|
56
57
|
slots: {},
|
|
57
58
|
accounts: {
|
|
@@ -56,7 +56,8 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
|
|
|
56
56
|
}
|
|
57
57
|
this.onChange = onChange;
|
|
58
58
|
// Subscribe with grpc
|
|
59
|
-
this.stream =
|
|
59
|
+
this.stream =
|
|
60
|
+
(await this.client.subscribe());
|
|
60
61
|
const filters = this.options.filters.map((filter) => {
|
|
61
62
|
return {
|
|
62
63
|
memcmp: {
|
|
@@ -92,7 +92,7 @@ class JupiterClient {
|
|
|
92
92
|
}),
|
|
93
93
|
})).json();
|
|
94
94
|
if (!('swapTransaction' in resp)) {
|
|
95
|
-
throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${
|
|
95
|
+
throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${', ' + ((_a = resp.message) !== null && _a !== void 0 ? _a : '')}`);
|
|
96
96
|
}
|
|
97
97
|
const { swapTransaction } = resp;
|
|
98
98
|
try {
|
package/lib/node/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -72,7 +72,8 @@ export class grpcAccountSubscriber<T> extends WebSocketAccountSubscriber<T> {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// Subscribe with grpc
|
|
75
|
-
this.stream =
|
|
75
|
+
this.stream =
|
|
76
|
+
(await this.client.subscribe()) as unknown as typeof this.stream;
|
|
76
77
|
const request: SubscribeRequest = {
|
|
77
78
|
slots: {},
|
|
78
79
|
accounts: {
|
|
@@ -92,7 +92,8 @@ export class grpcProgramAccountSubscriber<
|
|
|
92
92
|
this.onChange = onChange;
|
|
93
93
|
|
|
94
94
|
// Subscribe with grpc
|
|
95
|
-
this.stream =
|
|
95
|
+
this.stream =
|
|
96
|
+
(await this.client.subscribe()) as unknown as typeof this.stream;
|
|
96
97
|
const filters = this.options.filters.map((filter) => {
|
|
97
98
|
return {
|
|
98
99
|
memcmp: {
|
package/src/types.ts
CHANGED