Skip to content

fix: funder set automatically during auth#8

Merged
augustin-v merged 5 commits into
mainfrom
fix/constructor-friction
Feb 16, 2026
Merged

fix: funder set automatically during auth#8
augustin-v merged 5 commits into
mainfrom
fix/constructor-friction

Conversation

@augustin-v

Copy link
Copy Markdown
Owner

related issue #7

Description

Removed the need of calling .set_funder() to authenticate, which used to cause unnecessary friction.

The funder now gets set during auth with L2 headers (constructor panics in case POLY_FUNDER is not set.)

Updated examples to reflect the update.

@atkinssamuel

Copy link
Copy Markdown
Contributor

Just tested and this works. It now panics if POLY_FUNDER is not set, and sets it automatically in the body if it is set. Great job.

@atkinssamuel

Copy link
Copy Markdown
Contributor

Before closing, I had a question about the form of the client.

For reference, this is how I would instantiate a Pythonic version of the Polymarket client:

client = ClobClient(
        "https://clob.polymarket.com",
        key=pk,
        chain_id=POLYGON,
        signature_type=1,
        funder=funder,
    )

The L1 auth is baked into this, so as a user, you don't need to care about doing it yourself. Also, if you have different naming for environment variables, or for any other reason don't want to use environment variables, you can't use the current flow.

It would be nice as a feature to be able to do this with polysqueeze:

let poly_client = ClobClient::new(&pk, &funder); // chain, url, & signature type are defaulted to 137, ..., & 1

@augustin-v
augustin-v force-pushed the fix/constructor-friction branch from 567a630 to 53f46f4 Compare February 16, 2026 09:09
@augustin-v
augustin-v merged commit e071715 into main Feb 16, 2026
1 check passed
@augustin-v
augustin-v deleted the fix/constructor-friction branch February 16, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants