Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug Report
description: Report a bug in the SDK
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug!

- type: input
id: sdk-version
attributes:
label: SDK Version
description: What version of the SDK are you using?
placeholder: "0.0.3"
validations:
required: true

- type: input
id: node-version
attributes:
label: Node.js Version
description: What version of Node.js are you using?
placeholder: "20.10.0"
validations:
required: true

- type: dropdown
id: os
attributes:
label: Operating System
options:
- macOS
- Linux
- Windows
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Initialize client with...
2. Call method...
3. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened?
validations:
required: true

- type: textarea
id: code
attributes:
label: Code Sample
description: Minimal code to reproduce the issue
render: typescript
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://docs.polymarket.us
about: Check the documentation for usage guides
- name: Discord
url: https://discord.gg/polymarket
about: Ask questions in our Discord community
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature Request
description: Suggest a new feature
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature!

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the feature you'd like
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Use Case
description: Why do you need this feature? What problem does it solve?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any alternative solutions or workarounds you've considered

- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other context, screenshots, or code samples
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Changes

<!-- What does this PR do? -->

## Testing

<!-- How was this tested? -->

## Checklist

- [ ] Tests pass (`pnpm test`)
- [ ] Linting passes (`pnpm lint`)
- [ ] Types check (`pnpm build`)
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI

permissions:
contents: read

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- run: pnpm lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- run: pnpm typecheck

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- run: pnpm build

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- run: pnpm test
35 changes: 32 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
/node_modules
/dist
/test
# Dependencies
node_modules/

# Build output
dist/

# Test coverage
coverage/

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment
.env
.env.local
.env.*.local

# Package tarballs
*.tgz
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contributing

## Environment Setup

This project uses [`pnpm`](https://pnpm.io/) as its package manager.

```sh
pnpm install
pnpm build
```

## Development

```sh
# Build the SDK
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

# Lint
pnpm lint

# Format
pnpm format
```

## Running Tests

```sh
pnpm test
```

Tests use Jest with mocked fetch calls. No API credentials are required for running tests.

## Linting and Formatting

This project uses [Biome](https://biomejs.dev/) for linting and formatting.

```sh
# Check for lint errors
pnpm lint

# Fix lint errors and format
pnpm lint:fix
```

## Making Changes

1. Create a new branch for your changes
2. Make your changes
3. Run `pnpm test` and `pnpm lint` to ensure everything passes
4. Submit a pull request

## Publishing

Releases are automated via GitHub Actions. When a PR is merged to `main`, the CI will automatically publish to npm based on conventional commit messages:

- `feat!:` or `BREAKING CHANGE` → major version bump
- `feat:` → minor version bump
- All other commits → patch version bump
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Polymarket

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading