Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Installation

Core

@spandex/core provides all the functionality to interact with multiple aggregators, simulate quotes onchain, and execute swaps. It depends on viem for blockchain interactions.

npm
npm i viem @spandex/core

React

@spandex/react provides React hooks for integrating SpanDEX into your React applications. It depends on wagmi.

npm
npm i wagmi @spandex/react

Security Considerations

Given that SpanDEX presents unsigned transaction data for execution, it's crucial have a security stance. Some recommended practices include:

  • Lock or pin dependencies to specific versions to reduce supply chain attack risk.
  • Use a package manager that supports integrity checks, such as npm or yarn, to verify the authenticity of packages.
  • Require packages have a minimum age before updating, using pnpms minimumReleaseAge or similar features in other package managers.
  • Ensure web apps have Content Security Policies (CSP) in place to mitigate risks from malicious scripts.
  • Remember that supply chain attacks are real and the EVM is a ripe target.