Skip to content

Conversation

@augustin-v
Copy link
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
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
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

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.

3 participants