JSPM

@0xsquid/sdk

1.0.0-beta.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5033
  • Score
    100M100P100Q125154F
  • License MIT

## Integration Tests

Package Exports

  • @0xsquid/sdk
  • @0xsquid/sdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@0xsquid/sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

api-sdk

Integration Tests

  1. Run the backend API

  2. Run all tests

yarn integration

Run only specific tests

yarn integration:sendtrade
yarn integration:tradesend
yarn integration:tradesendtrade

Examples to interact with the Squid API - testnet supported

API endpoint documentation https://app.gitbook.com/o/bX90yMGYDBu3T1Hqg4EA/s/tXbXyuWIO2PwzNc5Dets/integrate-squid/api

  • install package dependancies "yarn install"
  • configuration in .env file (rename example to .env)
  • explore the /api/quotes & api/tokens endpoints for supported chains and tokens
  • run approval.ts to approve tokens before any transactions eg "yarn ts-node approve.ts"
  • run transaction.ts to query /api/transaction endpoint and send tokens cross chain ✨

Notes

Transactions are not sent via the api, the api is a helper endpoint only, transactions are submitted via the callers rpc endpoint.