You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lazer/sdk/js/examples/index.ts
+74-57Lines changed: 74 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -6,65 +6,82 @@ import { PythLazerClient } from "../src/index.js";
6
6
// Ignore debug messages
7
7
console.debug=()=>{};
8
8
9
-
constclient=newPythLazerClient(
10
-
["wss://pyth-lazer.dourolabs.app/v1/stream"],
11
-
"access_token",
12
-
3,// Optionally specify number of parallel redundant connections to reduce the chance of dropped messages. The connections will round-robin across the provided URLs. Default is 3.
13
-
console// Optionally log socket operations (to the console in this case.)
14
-
);
9
+
asyncfunctionmain(){
10
+
try{
11
+
constclient=awaitPythLazerClient.create(
12
+
["wss://pyth-lazer.dourolabs.app/v1/stream"],
13
+
"access_token",
14
+
3,// Optionally specify number of parallel redundant connections to reduce the chance of dropped messages. The connections will round-robin across the provided URLs. Default is 3.
15
+
console// Optionally log socket operations (to the console in this case.)
0 commit comments