import Client from "@triton-one/yellowstone-grpc";
const main = async () => {
const client = new Client(
"http://some-grpc.host.com",
"some-key", {
"grpc.max_receive_message_length": 64 * 1024 * 1024 // 64 MB
});
// now you can call the client methods, e.g.:
const version = await client.getVersion(); // gets the version information
console.log(version);
}
main();
And I got the following error when running npx esrun get-version.ts:
const client = new Client(
^
TypeError: Client is not a constructor
Am I missing anything from the doc and how could we solve?
When I trying with the steps on https://docs.triton.one/project-yellowstone/dragons-mouth-grpc-subscriptions#nodejs-typescript, and save the following content in
get-version.ts
:And I got the following error when running
npx esrun get-version.ts
:Am I missing anything from the doc and how could we solve?