Skip to content

Tags: Polymarket/clob-client

Tags

v5.3.0

Toggle v5.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor: port clob-order-utils into clob-client (#312)

### What changed
- Vendored order-utils surface into new local module:
  - [src/order-utils/index.ts](/Users/carlos/Developer/clob-client/src/order-utils/index.ts)
  - [src/order-utils/exchange.order.builder.ts](/Users/carlos/Developer/clob-client/src/order-utils/exchange.order.builder.ts)
  - [src/order-utils/exchange.order.const.ts](/Users/carlos/Developer/clob-client/src/order-utils/exchange.order.const.ts)
  - [src/order-utils/utils.ts](/Users/carlos/Developer/clob-client/src/order-utils/utils.ts)
  - [src/order-utils/model/eip712.model.ts](/Users/carlos/Developer/clob-client/src/order-utils/model/eip712.model.ts)
  - [src/order-utils/model/order.model.ts](/Users/carlos/Developer/clob-client/src/order-utils/model/order.model.ts)
  - [src/order-utils/model/order-side.model.ts](/Users/carlos/Developer/clob-client/src/order-utils/model/order-side.model.ts)
  - [src/order-utils/model/signature-types.model.ts](/Users/carlos/Developer/clob-client/src/order-utils/model/signature-types.model.ts)

- Replaced all `@polymarket/order-utils` imports in source/tests/examples with local imports.
- Updated root exports in [src/index.ts](/Users/carlos/Developer/clob-client/src/index.ts):
  - Re-exported `SignatureType`, `ExchangeOrderBuilder`
  - Re-exported vendored side enum as `OrderSide`
  - Re-exported order/EIP712 types.
- Removed dependency from [package.json](/Users/carlos/Developer/clob-client/package.json) and regenerated [pnpm-lock.yaml](/Users/carlos/Developer/clob-client/pnpm-lock.yaml) via `pnpm remove`.
- Fixed pre-existing typecheck blockers:
  - Added usage of example clients in [examples/signatureTypes.ts](/Users/carlos/Developer/clob-client/examples/signatureTypes.ts)
  - Added missing `last_trade_price` fixture field and updated expected hash in [tests/utilities.test.ts](/Users/carlos/Developer/clob-client/tests/utilities.test.ts)
- Fixed Node 24 test-runner flow by changing [Makefile](/Users/carlos/Developer/clob-client/Makefile) test target to:
  - compile TS first (`tsc`)
  - run `mocha` against `dist/tests/**/*.test.js`.

### Validation run
- `pnpm tsc -p tsconfig.json --noEmit` ✅
- `pnpm test` ✅
- `pnpm build` ✅
- `rg -n "@polymarket/order-utils" -S` ✅ no matches

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Moderate risk because it swaps a core order-signing dependency for a vendored implementation and changes the test compilation/execution flow; order hashing/signature typing and build outputs could diverge if the port differs from upstream.
> 
> **Overview**
> **Ports `@polymarket/order-utils` into this repo** by adding a new `src/order-utils` module (EIP-712 models, `ExchangeOrderBuilder`, signature/side enums, constants, and salt helper) and rewiring `ClobClient`, order builder/helpers, utilities, RFQ deps, tests, and examples to import from it.
> 
> **Public API updates:** `src/index.ts` now re-exports `ExchangeOrderBuilder`, `SignatureType`, vendored `Side` as `OrderSide`, and related order/EIP-712 types; `package.json` drops the external `@polymarket/order-utils` dependency and bumps version to `5.3.0`.
> 
> **Tooling/tests:** `make test` now compiles TS to `dist` and runs coverage against `dist/tests/**/*.test.js` using `mocha` (removing `ts-mocha`), and the utilities test fixture/hash expectation is updated to include `last_trade_price`.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4a71d26. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

v5.2.4

Toggle v5.2.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #308 from Polymarket/sami/throw-on-error

throw on error

v5.2.3

Toggle v5.2.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #301 from Polymarket/sami/throw-error

fix: handle errors in API responses for tick size, negative risk, and fee rate

v5.2.3-1

Toggle v5.2.3-1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
update pckage version (#302)

v5.2.2

Toggle v5.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bump (#300)

v5.2.1

Toggle v5.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: rfq params cleanup (#263)

* fixes

* bump version

v5.2.0

Toggle v5.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
add: HeartBeats V1 (#253)

* add implementation

* fix comments

* update version

v5.1.3

Toggle v5.1.3's commit message
resources

v5.1.2

Toggle v5.1.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: RFQ Invert price for requester order (#242)

* fix: calc price for requester order

* chore: bump version

v5.1.1

Toggle v5.1.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: RFQ Accept fixes (#229)

* fix: generate the order for accept using quote fields

* chore: logs

* fix: bump version

* chore: better func

* chore: lint