Skip to content

[Request] Add missing RPC Client constructors (with commitment, with timeout) #414

@qsish

Description

@qsish

The rpc.Client is missing several constructor variants that the Rust SDK provides out of the box. The most painful gap is the inability to set a default commitment on the client — every call that needs a CommitmentType has to pass it explicitly. The HTTP timeout is also hardcoded and cannot be configured without assembling a JSONRPCClient by hand.

Proposal: add missing constructors

  • NewWithCommitment(url, commitment) — store a default commitment on the Client so every call that needs one uses it without having to pass it explicitly.
  • NewWithTimeout(url, timeout) — make the HTTP timeout configurable (currently hardcoded to 5 minutes).
  • NewWithTimeoutAndCommitment(url, timeout, commitment) — combined variant, matching the Rust SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions