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
1,694 changes: 1,315 additions & 379 deletions .claude/skills/swapper-integration/SKILL.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
name: Build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all history and tags for version extraction via git describe
fetch-depth: 0
- name: Setup Environment (PR)
if: ${{ github.event_name == 'pull_request' }}
# github actions run in the context of a special magical merge commit between the head of the PR
Expand All @@ -39,12 +42,12 @@ jobs:
echo "COMMIT_SHORT_HASH=`echo ${GITHUB_SHA} | cut -c1-7`" >> ${GITHUB_ENV}
echo "CURRENT_BRANCH_NAME=${{ github.ref_name }}" >> ${GITHUB_ENV}
- name: Extract Version
id: version
run: |
# For release commits (e.g., "chore: release v1.971.0"), extract semver
# Otherwise use the commit short hash
COMMIT_MSG=$(git log -1 --pretty=%B)
if [[ "$COMMIT_MSG" =~ v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
# Get version from the closest git tag (e.g., "v1.977.0" -> "1.977.0")
# Tags are created by release-please when PRs are merged to main
# Fallback to commit hash if no tags exist
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [[ "$TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
echo "version=${BASH_REMATCH[1]}" >> ${GITHUB_ENV}
else
echo "version=${{ env.COMMIT_SHORT_HASH }}" >> ${GITHUB_ENV}
Expand All @@ -62,7 +65,7 @@ jobs:
env: { CONTENT : "${{ toJson(github) }}" }
run: "echo $CONTENT"
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: OpenJDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '11'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:
release:
# Only run when PR is merged, not just closed
if: github.event.pull_request.merged == true
# Only run for merged release PRs (title contains version like "chore: release v1.977.0")
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'release v')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,12 +30,18 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
# Extract version from PR title (e.g., "chore: release v1.971.0" -> "1.971.0")
# Or use the merge commit SHA if not a release PR
# Fallback to git tag for consistency with deployed version
if [[ "$PR_TITLE" =~ v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION="${BASH_REMATCH[1]}"
else
VERSION="${{ github.event.pull_request.merge_commit_sha }}"
VERSION="${VERSION:0:7}"
# Use git tag to match deployed version
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [[ "$TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
VERSION="${BASH_REMATCH[1]}"
else
VERSION="${{ github.event.pull_request.merge_commit_sha }}"
VERSION="${VERSION:0:7}"
fi
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# generated files
packages/unchained-client/src/generated
Expand Down
550 changes: 550 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
nodeLinker: node-modules

npmAuthToken: "${NPM_AUTH-fallback}"

npmRegistryServer: "https://registry.npmjs.org"

plugins:
Expand All @@ -9,10 +11,11 @@ plugins:
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-postinstall.cjs
spec: "https://raw.githubusercontent.com/gravitywelluk/yarn-plugin-postinstall/master/bundles/%40yarnpkg/plugin-postinstall.js"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

unsafeHttpWhitelist:
- localhost
- 127.0.0.1

yarnPath: .yarn/releases/yarn-3.5.0.cjs
npmAuthToken: ${NPM_AUTH-fallback}
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,13 @@
"@chakra-ui/react": "^2.10.7",
"@chakra-ui/system": "^2.6.2",
"@chakra-ui/tag": "^3.1.1",
"@cowprotocol/app-data": "^2.3.0",
"@defuse-protocol/one-click-sdk-typescript": "^0.1.1-0.2",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^3.0.2",
"@formatjs/intl-numberformat": "^8.10.3",
"@formatjs/intl-pluralrules": "^5.2.14",
"@json-rpc-tools/utils": "^1.7.6",
"@jup-ag/api": "^6.0.30",
"@keepkey/hdwallet-keepkey-rest": "1.40.42",
"@keepkey/keepkey-sdk": "0.2.57",
"@ledgerhq/hw-transport-webusb": "^6.29.2",
Expand Down Expand Up @@ -131,9 +128,6 @@
"@tanstack/react-query": "^5.69.0",
"@tanstack/react-table": "^8.20.6",
"@tanstack/react-virtual": "^3.11.2",
"@uniswap/sdk": "^3.0.3",
"@uniswap/sdk-core": "^5.3.1",
"@uniswap/v3-sdk": "^3.13.1",
"@visx/gradient": "^3.3.0",
"@visx/grid": "^3.5.0",
"@visx/responsive": "^3.10.2",
Expand All @@ -147,7 +141,6 @@
"bignumber.js": "^9.3.1",
"bip21": "^2.0.3",
"bip39": "^3.0.4",
"bs58check": "^2.1.2",
"buffer": "^6.0.3",
"chakra-ui-steps": "^2.2.0",
"crypto-browserify": "^3.12.0",
Expand All @@ -161,7 +154,6 @@
"envalid": "^7.3.1",
"eth-url-parser": "^1.0.4",
"ethers": "6.11.1",
"ethers5": "npm:ethers@5.7.2",
"eventemitter2": "5.0.1",
"events": "^3.3.0",
"framer-motion": "^12.6.5",
Expand Down Expand Up @@ -232,7 +224,6 @@
"@peculiar/webcrypto": "^1.3.3",
"@testing-library/react": "^13.3.0",
"@types/bip21": "^2.0.0",
"@types/bs58check": "^2.1.0",
"@types/cli-progress": "^3.11.5",
"@types/d3-array": "^3.0.1",
"@types/dompurify": "^2.3.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/caip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/caip",
"version": "8.16.3",
"version": "8.16.5",
"description": "CAIP Implementation",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
Expand Down Expand Up @@ -31,5 +31,8 @@
"postbuild": "yarn postbuild:esm && yarn postbuild:cjs",
"postbuild:esm": "yarn run -T tsc-esm-fix --target=dist/esm --ext=.js",
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
},
"dependencies": {
"axios": "^1.13.0"
}
}
17 changes: 14 additions & 3 deletions packages/chain-adapters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/chain-adapters",
"version": "11.3.4",
"version": "11.3.6",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -31,17 +31,28 @@
"dependencies": {
"@mysten/sui": "1.45.0",
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.21",
"@shapeshiftoss/hdwallet-ledger": "1.62.21",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"axios": "^1.13.0",
"bech32": "^2.0.0",
"bignumber.js": "^9.3.1",
"bs58check": "^2.1.2",
"coinselect": "^3.1.13",
"lodash": "^4.17.21",
"multicoin-address-validator": "^0.5.12",
"p-queue": "^8.0.1"
"node-polyglot": "^2.4.0",
"p-queue": "^8.0.1",
"viem": "^2.40.3"
},
"devDependencies": {
"@types/multicoin-address-validator": "^0.5.0"
"@types/bs58check": "^2.1.0",
"@types/lodash": "^4.14.178",
"@types/multicoin-address-validator": "^0.5.0",
"@types/node-polyglot": "^2.4.2"
}
}
12 changes: 10 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/contracts",
"version": "1.0.2",
"version": "1.0.4",
"packageManager": "yarn@3.5.0",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
Expand Down Expand Up @@ -32,6 +32,14 @@
"dependencies": {
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/utils": "workspace:^"
"@shapeshiftoss/utils": "workspace:^",
"@uniswap/sdk": "^3.0.3",
"ethers": "6.11.1",
"ethers5": "npm:ethers@5.7.2",
"lodash": "^4.17.21",
"viem": "^2.40.3"
},
"devDependencies": {
"@types/lodash": "^4.14.178"
}
}
37 changes: 35 additions & 2 deletions packages/swapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/swapper",
"version": "17.6.5",
"version": "17.6.7",
"packageManager": "yarn@3.5.0",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
Expand Down Expand Up @@ -30,10 +30,43 @@
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
},
"dependencies": {
"@arbitrum/sdk": "^4.0.1",
"@coral-xyz/anchor": "0.29.0",
"@cowprotocol/app-data": "^2.3.0",
"@defuse-protocol/one-click-sdk-typescript": "^0.1.1-0.2",
"@jup-ag/api": "^6.0.30",
"@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0",
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.21",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/utils": "workspace:^"
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
"@sniptt/monads": "^0.5.10",
"@solana/web3.js": "^1.98.0",
"@uniswap/sdk-core": "^5.3.1",
"@uniswap/v3-sdk": "^3.13.1",
"axios": "^1.13.0",
"axios-cache-interceptor": "^1.5.3",
"bignumber.js": "^9.3.1",
"eip-712": "^1.0.0",
"ethers": "6.11.1",
"ethers5": "npm:ethers@5.7.2",
"lodash": "^4.17.21",
"mixpanel-browser": "^2.67.0",
"node-polyglot": "^2.4.0",
"pretty-ms": "7.0.1",
"qs": "^6.10.5",
"retry-axios": "^2.6.0",
"uuid": "^9.0.0",
"viem": "^2.40.3"
},
"devDependencies": {
"@types/lodash": "^4.14.178",
"@types/mixpanel-browser": "^2.38.1",
"@types/node-polyglot": "^2.4.2",
"@types/qs": "^6.9.18",
"@types/uuid": "^9.0.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Result } from '@sniptt/monads'
import type { AxiosResponse } from 'axios'
import type { SwapErrorRight, SwapperConfig } from 'packages/swapper/src/types'

import type { SwapErrorRight, SwapperConfig } from '../../../types'
import { relayService } from './relayService'
import type { RelayFetchQuoteParams, RelayQuote } from './types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as bitcoin from '@shapeshiftoss/bitcoinjs-lib'

export const getRelayPsbtRelayer = (psbtHex: string, sellAmountCryptoBaseUnit: string) => {
const psbtBuffer = Buffer.from(psbtHex, 'hex')
const psbt = bitcoin.Psbt.fromBuffer(new Uint8Array(psbtBuffer))
const psbt = bitcoin.Psbt.fromBuffer(psbtBuffer)

const outputs = psbt.txOutputs
for (let i = 0; i < outputs.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Result } from '@sniptt/monads'
import type { AxiosResponse } from 'axios'
import type { SwapErrorRight, SwapperConfig } from 'packages/swapper/src/types'

import type { SwapErrorRight, SwapperConfig } from '../../../types'
import { relayService } from './relayService'
import type { RelayQuote } from './types'

Expand Down
1 change: 1 addition & 0 deletions packages/swapper/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export type SwapExecutionMetadata = {
buyTxHash?: string
streamingSwap?: StreamingSwapMetadata
message?: string | [string, InterpolationOptions]
inboundAddress?: string
}

export type SwapperSpecificMetadata = {
Expand Down
9 changes: 6 additions & 3 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/types",
"version": "8.6.3",
"version": "8.6.5",
"description": "Common types shared across packages",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
Expand Down Expand Up @@ -29,7 +29,10 @@
"postbuild:esm": "yarn run -T tsc-esm-fix --target=dist/esm --ext=.js",
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json"
},
"devDependencies": {
"@shapeshiftoss/caip": "workspace:^"
"dependencies": {
"@cowprotocol/app-data": "^2.3.0",
"@shapeshiftoss/caip": "workspace:^",
"ethers5": "npm:ethers@5.7.2",
"viem": "^2.40.3"
}
}
9 changes: 6 additions & 3 deletions packages/unchained-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/unchained-client",
"version": "10.14.6",
"version": "10.14.8",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -33,9 +33,12 @@
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/common-api": "^9.3.0",
"@shapeshiftoss/contracts": "workspace:^",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"@shapeshiftoss/utils": "workspace:^",
"axios": "^1.13.0",
"bignumber.js": "^9.3.1",
"ethers": "6.11.1",
"isomorphic-ws": "^4.0.1",
"viem": "^2.40.3",
"ws": "^8.17.1"
},
"devDependencies": {
Expand Down
Loading
Loading