jito-labs / jito-ts

Jito Typescript SDK
Other
92 stars 50 forks source link

`url` in seacherClient constructor is misleading as it only accepts a hostname #5

Open futurekarol opened 1 year ago

futurekarol commented 1 year ago

According to the constructor signature searcherClient(url: string, authKeypair: Keypair) and the example const c = searcherClient(blockEngineUrl, keypair); the constructor expects a url for the block engine.

It errors when using BLOCK_ENGINE_URL=https://frankfurt.mainnet.block-engine.jito.wtf. Instead, it expects just the hostname, like BLOCK_ENGINE_URL=frankfurt.mainnet.block-engine.jito.wtf.

Proposed solution: make sure it accepts urls and not just hostnames to make it consistent with the signature, example and jito docs (https://jito-labs.gitbook.io/mev/searcher-resources/block-engine/mainnet-addresses)

on1force commented 3 weeks ago

so simple yet generate so many confusions.. up on this