{"_id":"@0xabcdefg/uniswapx-sdk","name":"@0xabcdefg/uniswapx-sdk","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@0xabcdefg/uniswapx-sdk","version":"1.0.0","author":{"name":"Uniswap"},"repository":{"type":"git","url":"git+https://github.com/Uniswap/sdks.git"},"keywords":["uniswap","ethereum"],"license":"MIT","main":"dist/src/index.js","typings":"dist/src/index.d.ts","module":"dist/uniswapx-sdk.esm.js","engines":{"node":">=10"},"scripts":{"build":"npm run typechain && tsc -p tsconfig.json","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","prettier":"prettier \"src/**/*.ts\" --list-different","release":"semantic-release","test":"run-s build test:unit test:integration","test:unit":"jest --testPathPattern src --detectOpenHandles --forceExit --testPathIgnorePatterns dist","test:integration":"yarn build && cd integration && yarn && yarn test","typechain":"typechain --target=ethers-v5 --out-dir src/contracts --glob ./abis/**/*.json"},"dependencies":{"@ethersproject/bytes":"^5.7.0","@ethersproject/providers":"^5.7.0","@uniswap/permit2-sdk":"^1.2.1","@uniswap/sdk-core":"npm:@0xabcdefg/sdk-core@^1.0.0","ethers":"^5.7.0"},"devDependencies":{"@typechain/ethers-v5":"^10.1.0","@types/jest":"^24.0.25","@types/node":"^18.7.16","@typescript-eslint/eslint-plugin":"^5.62","@typescript-eslint/parser":"^5.62","eslint":"^7.8.0","eslint-config-prettier":"^6.11.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-functional":"^3.0.2","eslint-plugin-import":"^2.22.0","husky":"^8.0.3","jest":"25.5.0","jest-environment-node":"25.5.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"25.5.0","ts-node":"^10.9.1","typechain":"^8.1.0","typescript":"^4.3.3"},"husky":{"hooks":{"pre-commit":"yarn fix"}},"publishConfig":{"access":"public"},"release":{"extends":"semantic-release-monorepo","branches":[{"name":"still-in-alpha","prerelease":false},{"name":"beta","prerelease":true}],"plugins":[["@semantic-release/commit-analyzer",{"preset":"angular","releaseRules":"../../publishing/release-rules.cjs"}],"@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/github",["@semantic-release/exec",{"successCmd":"git restore yarn.lock && yarn","failCmd":"git restore yarn.lock && yarn","execCwd":"../.."}]]},"_id":"@0xabcdefg/uniswapx-sdk@1.0.0","gitHead":"c9bac89a945c6eee7bbeca29bc3aac3636065de2","description":"SDK for the UniswapX protocol","bugs":{"url":"https://github.com/Uniswap/sdks/issues"},"homepage":"https://github.com/Uniswap/sdks#readme","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-ffCwWOWSl9ghYFftnvyTXTvDlggZEAVN/Z3NW+CE1vIYwXgSoKcpjdnODI7rdP0ZMH7KPsLZ6ATHlEfmKsSI7g==","shasum":"92d2bba10264a59236e96d8a6876f3934e21b1e9","tarball":"https://registry.npmjs.org/@0xabcdefg/uniswapx-sdk/-/uniswapx-sdk-1.0.0.tgz","fileCount":210,"unpackedSize":1376818,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC2v/eH7Yz3D5nfV2F0AZIgwPBJHYwbxgMlyvg9U/qTmAiAoXO+xh54O2mh7WF+0O7OTT6/3aGJY8NcMuxwC08F3YQ=="}]},"_npmUser":{"name":"0xabcdefg","email":"abcdefg@xwx.cool"},"directories":{},"maintainers":[{"name":"0xabcdefg","email":"abcdefg@xwx.cool"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/uniswapx-sdk_1.0.0_1756548939541_0.7767923831986534"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-30T10:15:39.306Z","1.0.0":"2025-08-30T10:15:39.756Z","modified":"2025-08-30T10:15:40.027Z"},"maintainers":[{"name":"0xabcdefg","email":"abcdefg@xwx.cool"}],"description":"SDK for the UniswapX protocol","homepage":"https://github.com/Uniswap/sdks#readme","keywords":["uniswap","ethereum"],"repository":{"type":"git","url":"git+https://github.com/Uniswap/sdks.git"},"author":{"name":"Uniswap"},"bugs":{"url":"https://github.com/Uniswap/sdks/issues"},"license":"MIT","readme":"# uniswapx-sdk\n\nSDK for the UniswapX protocol\n\n## Usage\n\nThe SDK contains bindings for two main flows: parsing serialized orders & building new orders.\n\n### Building & Signing Orders\n\n```ts\nimport { DutchOrder, NonceManager } from '@uniswap/uniswapx-sdk';\nimport { ethers } from 'ethers';\n\nconst provider = new ethers.providers.JsonRpcProvider(RPC_URL);\nconst account = await provider.getSigner().getAddress(); \nconst nonceMgr = new NonceManager(provider, 1); \nconst nonce = await nonceMgr.useNonce(account); \n\nconst chainId = 1;\nconst builder = new DutchOrderBuilder(chainId);\nconst order = builder\n  .deadline(deadline)\n  .decayEndTime(deadline)\n  .decayStartTime(deadline - 100)\n  .nonce(nonce)\n  .input({\n    token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n    amount: BigNumber.from('1000000'),\n  })\n  .output({\n    token: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n    startAmount: BigNumber.from('1000000000000000000'),\n    endAmount: BigNumber.from('900000000000000000'),\n    recipient: '0x0000000000000000000000000000000000000000',\n  })\n  .build();\n \n// Sign the built order \nconst { domain, types, values } = order.permitData();\nconst signature = wallet._signTypedData(domain, types, values);\n\nconst serializedOrder = order.serialize();\n// submit serializedOrder and signature to order pool\n```\n\n### Parsing Orders\n```ts\nimport { DutchOrder, Order } from '@uniswap/uniswapx-sdk';\n\nconst serializedOrder = '0x1111222233334444555500000000234300234...';\nconst chainId = 1; \n\nconst order: Order = DutchOrder.parse(serializedOrder, chainId);\n\nconst orderData = order.info;\nconst orderHash = order.hash();\n```\n### Validating Orders \n```ts\nimport { ethers } from 'ethers';\nimport { OrderValidator } from 'uniswapx-sdk';\n\nconst provider = new ethers.providers.JsonRpcProvider(RPC_URL);\nconst validator = new OrderValidator(provider, CHAIN_ID); \nconst orders: SignedOrder[] = [\n  {\n    order: order1, \n    signature: signature1\n  }, \n  {\n    order: order2, \n    signature: signature2\n  }\n]; \n\ntry {\n  const statusList: OrderValidation[] = await validator.validateBatch(orders); \n  // Do something with list of statuses \n}\ncatch(e) {\n  // Handle error\n}\n\n```\n\n### Order Object\n\n**serialize()**\n\nReturns an abi-encoded serialization of the order. This serialized format is passed into the corresponding reactor contract for execution.\n\n\n**getSigner(signature)**\n\nRecovers the address which created the given signature over the order. Used to determine the order maker.\n\n\n**permitData()**\n\nReturns the domain, types, and values used to generate an EIP-712 signature over the order. Note that this signature both approves the release of the order's input tokens _and_ the execution of the order itself.\n\n\n**hash()**\n\nReturns the order hash. This is used as a key to track order fulfillment on-chain. It may also be useful as a unique order identifier for off-chain purposes.\n\n","readmeFilename":"README.md","_rev":"1-65693d32f8fa1a0b7f6ccc9b1a676c61"}