Defuse Protocol Monorepo
This is a monorepo for Defuse Protocol packages managed with Turborepo and Changesets.
Packages
- @defuse-protocol/intents-sdk - SDK for Near Intents
- @defuse-protocol/contract-types - TypeScript type definitions for Defuse Protocol contracts
Development
Prerequisites
- PNPM (v10.14.0)
Setup
# Install dependencies
pnpm install
Build
# Build all packages
pnpm run build
Development Mode
# Run all packages in dev mode
pnpm run dev
Lint
# Lint all packages
pnpm run lint
Format
# Format all packages
pnpm run format
Release Process
This repository uses Changesets to manage versions, create changelogs, and publish to npm.
Creating a changeset
When making changes that should be released, create a changeset:
pnpm run changeset
This will prompt you to:
- Select the packages you've modified
- Choose the semver increment (patch, minor, major)
- Add a description of the changes
The changeset will be committed to your branch as a markdown file in the .changeset directory.
Releasing
Releases are managed through GitHub Actions. To create a release:
- Make sure all your changesets are merged to main
- Go to the "Actions" tab in GitHub
- Select the "Release" workflow
- Click "Run workflow"
- Select "main" branch
- Click "Run workflow"
This will create a PR that:
- Updates package versions based on changesets
- Updates the CHANGELOG.md files
- Removes the changeset files
Once that PR is merged, the GitHub Action will automatically:
- Build the packages
- Publish to npm
License
MIT 2025 NEAR Foundation